PyTorch torch.rad2deg Function


Pytorch torch 参考手册PyTorch torch Reference Manual

torch.rad2degis a function in PyTorch used to convert radians to degrees.

Function Definition

torch.rad2deg(input, out=None)

Usage Example

Example

import torch

# Convert radians to degrees
x = torch.tensor([3.14159, 1.5708, 0.0])
result = torch.rad2deg(x)
print(result)

Pytorch torch 参考手册PyTorch torch Reference Manual

Other Extensions