PyTorch torch.polygamma Function
PyTorch torch Reference Manual
torch.polygammais a function in PyTorch used to compute the element-wise polygamma function.
Function Definition
torch.polygamma(n, input, out=None)
Usage Example
Example
import torch
# Compute the polygamma function
x = torch.tensor([1.0, 2.0, 3.0])
n = 1
result = torch.polygamma(n, x)
print(result)
# Compute the polygamma function
x = torch.tensor([1.0, 2.0, 3.0])
n = 1
result = torch.polygamma(n, x)
print(result)
Other Extensions