捷徑

torch.rad2deg

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

傳回一個新的 Tensor,其中 input 的每個元素都從弧度轉換為角度。

參數

input (Tensor) – 輸入 Tensor。

關鍵字引數

out (Tensor, optional) – 輸出 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 的完整開發者文件

檢視文件

教學

取得針對初學者和進階開發者的深入教學

檢視教學

資源

尋找開發資源並取得您的問題解答

檢視資源