• 文档 >
  • torch >
  • torch.deg2rad
快捷键

torch.deg2rad

torch.deg2rad(input, *, out=None) → Tensor

input 中的每个元素从角度(度)转换为弧度的新张量。

参数:

input (Tensor) – 输入张量。

关键字参数:

输出(张量,可选)- 输出张量。

示例:

>>> a = torch.tensor([[180.0, -180.0], [360.0, -360.0], [90.0, -90.0]])
>>> torch.deg2rad(a)
tensor([[ 3.1416, -3.1416],
        [ 6.2832, -6.2832],
        [ 1.5708, -1.5708]])

© 版权所有 PyTorch 贡献者。

使用 Sphinx 构建,并使用 Read the Docs 提供的主题。

文档

PyTorch 的全面开发者文档

查看文档

教程

深入了解初学者和高级开发者的教程

查看教程

资源

查找开发资源并获得您的疑问解答

查看资源