快捷方式

torch.sinh

torch.sinh(input, *, out=None) 張量

返回一個新的張量,其中包含 input 中元素的雙曲正弦值。

outi=sinh(inputi)\text{out}_{i} = \sinh(\text{input}_{i})
引數

input (張量) – 輸入張量。

關鍵字引數

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

示例

>>> a = torch.randn(4)
>>> a
tensor([ 0.5380, -0.8632, -0.1265,  0.9399])
>>> torch.sinh(a)
tensor([ 0.5644, -0.9744, -0.1268,  1.0845])

注意

input 在 CPU 上時,torch.sinh 的實現可能使用 Sleef 庫,該庫會將非常大的結果四捨五入為無窮大或負無窮大。詳見此處

文件

訪問 PyTorch 的全面開發者文件

檢視文件

教程

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

檢視教程

資源

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

檢視資源