PyTorch torch.erfc 函数
torch.erfc 是 PyTorch 中用于逐元素计算互补误差函数的函数。
函数定义
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 参考手册