reciprocal

dragon.math.reciprocal(
  inputs,
  **kwargs
)[source]

Compute the reciprocal of input.

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

Examples:

x = dragon.constant([0., 1., 2.])
print(dragon.math.reciprocal(x))  # [inf, 1., 0.5]
Parameters:
Returns:

dragon.Tensor – The output tensor.