TUTORIALAI 与数据科学FETCHED
PyTorch torch.tan 函数
PyTorch torch.tan 函数 Pytorch torch 参考手册 torch.tan 是 PyTorch 中用于计算逐元素正切的函数。 函数定义 torch.tan(input, out=None) 使用示例 实例 [mycode4 type='python'] import torch # 计算正切 x = torch.tensor([0.0, 0.7854, 1.5708]) ..
更新于 2026/7/16
教程详情页默认 noindex。
PyTorch torch.tan 函数
torch.tan 是 PyTorch 中用于计算逐元素正切的函数。
函数定义
torch.tan(input, out=None)
使用示例
实例
import torch
# 计算正切
x = torch.tensor([0.0, 0.7854, 1.5708])
result = torch.tan(x)
print(result)
# 计算正切
x = torch.tensor([0.0, 0.7854, 1.5708])
result = torch.tan(x)
print(result)
Pytorch torch 参考手册