pow

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

Compute the power of input.

\[\text{out} = x^{y} \]

The two inputs should be broadcast to each other:

x = tf.fill(dims=(1, 2), value=2)
print(tf.math.pow(x, x))  # [[4, 4]]
print(tf.math.pow(x, 3))  # [[8, 8]]
print(tf.math.pow(3, x))  # [[9, 9]]
Parameters:
  • x (Union[dragon.Tensor, number]) – The input tensor \(x\).
  • y (Union[dragon.Tensor, number]) – The input tensor \(y\).
  • name (str, optional) – A optional name for the operation.
Returns:

dragon.Tensor – The output tensor.