PyTorch torch.rad2deg function
PyTorch torch reference manual
torch.rad2deg is a function in PyTorch used to convert radians to degrees.
Function definition
torch.rad2deg(input, out=None)
Usage examples
Example
import
torch
Convert radians to degrees
x
=
torch.
tensor
(
[
3.14159
,
1.5708
,
0.0
]
)
result
=
torch.
rad2deg
(
x
)
(
result
)