API

 torch / torch


torch.i0

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

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

outi=I0(inputi)=k=0(inputi2/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])

此页内容是否对您有帮助