PyTorch torch.asinh 関数
torch.asinhは、PyTorch で要素ごとの逆双曲線正弦(inverse hyperbolic sine)を計算するために使用される関数です。
関数定義
torch.asinh(input, out=None)
使用例
実例
import torch
# テンソルを作成
x = torch.tensor([-3.0, -1.0, 0.0, 1.0, 3.0])
# 逆双曲線正弦を計算
result = torch.asinh(x)
print(result)
# テンソルを作成
x = torch.tensor([-3.0, -1.0, 0.0, 1.0, 3.0])
# 逆双曲線正弦を計算
result = torch.asinh(x)
print(result)
出力結果は次のとおりです:
tensor([-1.8184, -0.8814, 0.0000, 0.8814, 1.8184])
その他の拡張
Pytorch torch リファレンスマニュアル