pytorch / 1.8.0 / generated / torch.i0.html /

torch.i0

torch.i0(input, *, out=None) → Tensor

Computes the zeroth order modified Bessel function of the first kind for each element of input.

out i = I 0 ( input i ) = k = 0 ( input i 2 / 4 ) k ( k ! ) 2 \text{out}_{i} = I_0(\text{input}_{i}) = \sum_{k=0}^{\infty} \frac{(\text{input}_{i}^2/4)^k}{(k!)^2}
Parameters

input (Tensor) – the input tensor

Keyword Arguments

out (Tensor, optional) – the output tensor.

Example:

>>> torch.i0(torch.arange(5, dtype=torch.float32))
tensor([ 1.0000,  1.2661,  2.2796,  4.8808, 11.3019])

© 2019 Torch Contributors
Licensed under the 3-clause BSD License.
https://pytorch.org/docs/1.8.0/generated/torch.i0.html