mindspore.ops.igamma

查看源文件
mindspore.ops.igamma(input, other)[源代码]

计算正则化的下层不完全伽马函数。

如果我们将 input 比作 aother 比作 x ,则正则化的下层不完全伽马函数可以表示成:

\[P(a, x) = Gamma(a, x) / Gamma(a) = 1 - Q(a, x)\]

其中,

\[Gamma(a, x) = \int_0^x t^{a-1} \exp^{-t} dt\]

为下层不完全伽马函数。

\(Q(a, x)\) 则为正则化的上层完全伽马函数。

警告

这是一个实验性API,后续可能修改或删除。

参数:
  • input (Tensor) - 第一个输入tensor。

  • other (Tensor) - 第二个输入tensor。

返回:

Tensor

支持平台:

Ascend GPU CPU

样例:

>>> import mindspore
>>> input = mindspore.tensor([2.0, 4.0, 6.0, 8.0])
>>> other = mindspore.tensor([2.0, 3.0, 4.0, 5.0])
>>> output = mindspore.ops.igamma(input, other)
>>> print(output)
[0.5939941  0.35276785 0.21486954 0.13337176]