PyTorch torch.tan function
Pytorch torch Reference Manual
torch.tanis a function in PyTorch used to compute the element-wise tangent.
Function Definition
torch.tan(input, out=None)
Usage Example
Example
import torch
# Compute the tangent
x = torch.tensor([0.0, 0.7854, 1.5708])
result = torch.tan(x)
print(result)
# Compute the tangent
x = torch.tensor([0.0, 0.7854, 1.5708])
result = torch.tan(x)
print(result)
Other Extensions