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