reciprocal

dragon.vm.tensorflow.math.reciprocal(
  x,
  name=None
)[source]

Compute the reciprocal of input.

\[\text{out} = \frac{1}{\text{input}} \]

Examples:

x = tf.constant([0., 1., 2.])
print(tf.math.reciprocal(x))  # [inf, 1., 0.5]
Parameters:
  • x (dragon.Tensor) The input tensor.
  • name (str, optional) The operation name.
Returns:

dragon.Tensor The output tensor.