PyTorch torch.sinc 函数
torch.sinc 是 PyTorch 中用于计算逐元素 sinc 函数的函数。定义为 sin(pi*x)/(pi*x)。
函数定义
torch.sinc(input, out=None)
使用示例
实例
import torch
# 计算 sinc 函数
x = torch.tensor([0.0, 1.0, -1.0])
result = torch.sinc(x)
print(result)
# 计算 sinc 函数
x = torch.tensor([0.0, 1.0, -1.0])
result = torch.sinc(x)
print(result)

Pytorch torch 参考手册