Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PyTorch torch.rad2deg function

PyTorch torch.rad2deg function


PyTorch torch reference manual 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

)

print

(

result

)


PyTorch torch reference manual PyTorch torch reference manual