mindspore.ops.polygamma
- mindspore.ops.polygamma(n, input)[源代码]
计算 input 的多伽马函数的 \(n\) 阶导数。
\[\psi^{(a)}(x) = \frac{d^{(a)}}{dx^{(a)}} \psi(x)\]其中 \(\psi(x)\) 为digamma函数。
- 参数:
n (Tensor) - 多伽马函数求导的阶数。
input (Tensor) - 输入tensor。
- 返回:
Tensor。
- 支持平台:
GPU
CPU
样例:
>>> import mindspore >>> x = mindspore.tensor([3.14, -2.71], mindspore.float64) >>> a = mindspore.tensor(1, mindspore.int64) >>> output = mindspore.ops.polygamma(a, x) >>> print(output) [ 0.37446456 15.49884838]