PyTorch torch.float_power function
PyTorch torch reference manual
torch.float_power A function in PyTorch for element-wise floating-point power operations.
Function definition
torch.float_power(input, exponent, *, out=None)
Usage examples
Example
import
torch
Floating-point power operation example
x
=
torch.
tensor
(
[
2.0
,
3.0
,
4.0
]
)
y
=
torch.
tensor
(
[
2.0
,
2.0
,
2.0
]
)
result
=
torch.
float_power
(
x
,
y
)
(
result
)