PyTorch torch.rad2deg 函数
torch.rad2deg 是 PyTorch 中用于将弧度转换为角度的函数。
函数定义
torch.rad2deg(input, out=None)
使用示例
实例
import torch
# 将弧度转换为角度
x = torch.tensor([3.14159, 1.5708, 0.0])
result = torch.rad2deg(x)
print(result)
# 将弧度转换为角度
x = torch.tensor([3.14159, 1.5708, 0.0])
result = torch.rad2deg(x)
print(result)

Pytorch torch 参考手册