TUTORIALAI 与数据科学FETCHED

PyTorch torch.i0 函数

PyTorch torch.i0 函数 Pytorch torch 参考手册 torch.i0 是 PyTorch 中用于计算第一类修正贝塞尔函数(Modified Bessel Function of the First Kind)阶数为0的函数。 函数定义 torch.i0(input) 使用示例 实例 [mycode4 type='python'] import torch # 计算第一类..

更新于 2026/7/16

教程详情页默认 noindex。

PyTorch torch.i0 函数


Pytorch torch 参考手册 Pytorch torch 参考手册

torch.i0 是 PyTorch 中用于计算第一类修正贝塞尔函数(Modified Bessel Function of the First Kind)阶数为0的函数。

函数定义

torch.i0(input)

使用示例

实例

import torch

# 计算第一类修正贝塞尔函数
x = torch.tensor([0.0, 1.0, 2.0, 3.0])
y = torch.i0(x)
print("I0(x):", y)

输出结果为:

I0(x): tensor([1.0000, 1.2661, 2.2796, 4.8808])

Pytorch torch 参考手册 Pytorch torch 参考手册