tf.truncatediv

Returns x / y element-wise for integer types.

tf.truncatediv(
    x, y, name=None
)

Truncation designates that negative numbers will round fractional quantities toward zero. I.e. -7 / 5 = -1. This matches C semantics but it is different than Python semantics. See FloorDiv for a division function that matches Python Semantics.

NOTE: truncatediv supports broadcasting. More about broadcasting here

Args:

Returns:

A Tensor. Has the same type as x.