PyTorch torch.tan function
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
)
(
result
)