TUTORIALAI 与数据科学FETCHED
PyTorch torch.asinh 函数
PyTorch torch.asinh 函数 Pytorch torch 参考手册 torch.asinh 是 PyTorch 中用于计算逐元素反双曲正弦(inverse hyperbolic sine)的函数。 函数定义 torch.asinh(input, out=None) 使用示例 实例 [mycode4 type='python'] import torch # 创建张量 x = to..
更新于 2026/7/16
教程详情页默认 noindex。
PyTorch torch.asinh 函数
torch.asinh 是 PyTorch 中用于计算逐元素反双曲正弦(inverse hyperbolic sine)的函数。
函数定义
torch.asinh(input, out=None)
使用示例
实例
import torch
# 创建张量
x = torch.tensor([-3.0, -1.0, 0.0, 1.0, 3.0])
# 计算反双曲正弦
result = torch.asinh(x)
print(result)
# 创建张量
x = torch.tensor([-3.0, -1.0, 0.0, 1.0, 3.0])
# 计算反双曲正弦
result = torch.asinh(x)
print(result)
输出结果为:
tensor([-1.8184, -0.8814, 0.0000, 0.8814, 1.8184])
Pytorch torch 参考手册