Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PyTorch torch.sinc function

PyTorch torch.sinc function


PyTorch torch reference manual PyTorch torch reference manual

torch.sinc is a function in PyTorch used to compute the element-wise sinc function. It is defined as sin(pix)/(pix).

Function definition

torch.sinc(input, out=None)


Usage examples

Example

import

torch

Compute the sinc function

x

=

torch.

tensor

(

[

0.0

,

1.0

,

1.0

]

)

result

=

torch.

sinc

(

x

)

print

(

result

)


PyTorch torch reference manual PyTorch torch reference manual