PyTorch torch.arcsinh 関数
torch.arcsinhPyTorch において要素ごとの逆双曲線正弦(inverse hyperbolic sine)を計算する関数であり、torch.asinh機能は同じです。
関数定義
torch.arcsinh(input, out=None)
使用例
実例
import torch
# テンソルを作成
x = torch.tensor([-3.0, -1.0, 0.0, 1.0, 3.0])
# 逆双曲線正弦を計算
result = torch.arcsinh(x)
print(result)
# テンソルを作成
x = torch.tensor([-3.0, -1.0, 0.0, 1.0, 3.0])
# 逆双曲線正弦を計算
result = torch.arcsinh(x)
print(result)
出力結果は:
tensor([-1.8184, -0.8814, 0.0000, 0.8814, 1.8184])
その他の拡張
Pytorch torch 参考マニュアル