PyTorch torch.polygamma 関数
torch.polygammaは PyTorch で要素ごとに polygamma 関数を計算するために使用される関数です。
関数定義
torch.polygamma(n, input, out=None)
使用例
実例
import torch
# polygamma 関数を計算
x = torch.tensor([1.0, 2.0, 3.0])
n = 1
result = torch.polygamma(n, x)
print(result)
# polygamma 関数を計算
x = torch.tensor([1.0, 2.0, 3.0])
n = 1
result = torch.polygamma(n, x)
print(result)
その他の拡張
Pytorch torch リファレンスマニュアル