pow

dragon.vm.torch.pow(
  input,
  exponent,
  out=None
)[source]

Compute the power of input.

\[\text{out} = \text{input}^{\text{exponent}} \]

The two inputs should be broadcast to each other:

x = torch.tensor([[2, 2]])
print(torch.pow(x, x))  # [[4, 4]]
print(torch.pow(x, 3))  # [[8, 8]]
print(torch.pow(3, x))  # [[9, 9]]
Parameters:
Returns:

dragon.vm.torch.Tensor – The output tensor.