reciprocal

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

Compute the reciprocal of input.

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

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) – A optional name for the operation.
Returns:

dragon.Tensor – The output tensor.