PyTorch torch.sinh 函数

约 210 字 更新于 2026-11-18 5iyo.com

PyTorch torch.sinh 函数


torch.sinh 是 PyTorch 中用于计算逐元素双曲正弦的函数。

函数定义

torch.sinh(input, out=None)

使用示例

实例

import torch

# 计算双曲正弦
x = torch.tensor([-1.0, 0.0, 1.0])
result = torch.sinh(x)
print(result)