PyTorch torch.i0 function
PyTorch torch reference manual
torch.i0 A function in PyTorch for computing the modified Bessel function of the first kind of order 0.
Function definition
torch.i0(input)
Usage examples
Example
import
torch
Compute the modified Bessel function of the first kind
x
=
torch.
tensor
(
[
0.0
,
1.0
,
2.0
,
3.0
]
)
y
=
torch.
i0
(
x
)
(
"I0(x):"
,
y
)
The output is:
I0(x): tensor([1.0000, 1.2661, 2.2796, 4.8808])