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