W3cubDocs

/TensorFlow Python

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

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

See the guide: Math > Arithmetic Operators

Divides x / y elementwise (using Python 2 division operator semantics).

NOTE: Prefer using the Tensor division operator or tf.divide which obey Python division operator semantics.

This function divides x and y, forcing Python 2.7 semantics. That is, if one of x or y is a float, then the result will be a float. Otherwise, the output will be an integer type. Flooring semantics are used for integer division.

Args:

  • x: Tensor numerator of real numeric type.
  • y: Tensor denominator of real numeric type.
  • name: A name for the operation (optional). Returns: x / y returns the quotient of x and y.

Defined in tensorflow/python/ops/math_ops.py.

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/div