PyTorch torch.tan function


Pytorch torch 参考手册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)

Pytorch torch 参考手册Pytorch torch Reference Manual

Other Extensions