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