PyTorch torch.erfc 関数
torch.erfcPyTorch において、要素ごとに相補誤差関数を計算するための関数です。
関数定義
torch.erfc(input, *, out=None)
使用例
実例
import torch
# 相補誤差関数の例
x = torch.tensor([0, 0.5, 1.0, 2.0], dtype=torch.float32)
result = torch.erfc(x)
print(result) # tensor([1.0000, 0.4795, 0.1573, 0.0047])
# 相補誤差関数の例
x = torch.tensor([0, 0.5, 1.0, 2.0], dtype=torch.float32)
result = torch.erfc(x)
print(result) # tensor([1.0000, 0.4795, 0.1573, 0.0047])
その他の拡張
PyTorch torch リファレンスマニュアル