快捷方式

torch.atan

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

返回一個新張量,其中包含 input 中元素的反正切值。

outi=tan1(inputi)\text{out}_{i} = \tan^{-1}(\text{input}_{i})
引數

input (Tensor) – 輸入張量。

關鍵字引數

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

示例

>>> a = torch.randn(4)
>>> a
tensor([ 0.2341,  0.2539, -0.6256, -0.6448])
>>> torch.atan(a)
tensor([ 0.2299,  0.2487, -0.5591, -0.5727])

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

獲取針對初學者和高階開發者的深入教程

檢視教程

資源

查詢開發資源並獲得解答

檢視資源