torch.polygamma
-
torch.polygamma(n, input, *, out=None) → Tensor
-
Computes the derivative of the digamma function on
input
. is called the order of the polygamma function.Note
This function is implemented only for nonnegative integers .
- Parameters
- Keyword Arguments
-
out (Tensor, optional) – the output tensor.
- Example::
-
>>> a = torch.tensor([1, 0.5]) >>> torch.polygamma(1, a) tensor([1.64493, 4.9348]) >>> torch.polygamma(2, a) tensor([ -2.4041, -16.8288]) >>> torch.polygamma(3, a) tensor([ 6.4939, 97.4091]) >>> torch.polygamma(4, a) tensor([ -24.8863, -771.4742])
© 2019 Torch Contributors
Licensed under the 3-clause BSD License.
https://pytorch.org/docs/1.8.0/generated/torch.polygamma.html