快捷方式

torch.rad2deg

torch.rad2deg(input: Tensor, *, out: Optional[Tensor]) Tensor

返回一個新張量,其中 input 的每個元素都從弧度角轉換為度數角。

引數

input (Tensor) – 輸入張量。

關鍵字引數

out (Tensor, 可選) – 輸出張量。

示例

>>> a = torch.tensor([[3.142, -3.142], [6.283, -6.283], [1.570, -1.570]])
>>> torch.rad2deg(a)
tensor([[ 180.0233, -180.0233],
        [ 359.9894, -359.9894],
        [  89.9544,  -89.9544]])

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源