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

PyTorch torch.tan function

PyTorch torch.tan function


PyTorch torch reference manual PyTorch torch reference manual

torch.tan is a function in PyTorch used to compute the element-wise tangent.

Function definition

torch.tan(input, out=None)


Usage examples

Example

import

torch

Compute the tangent

x

=

torch.

tensor

(

[

0.0

,

0.7854

,

1.5708

]

)

result

=

torch.

tan

(

x

)

print

(

result

)


PyTorch torch reference manual PyTorch torch reference manual