PyTorch
torch / torch
torch.digamma¶
-
torch.
digamma
(input, *, out=None) → Tensor¶ Computes the logarithmic derivative of the gamma function on input.
ψ(x)=dxdln(Γ(x))=Γ(x)Γ′(x)- Parameters
input (Tensor) – the tensor to compute the digamma function on
- Keyword Arguments
out (Tensor, optional) – the output tensor.
Example:
>>> a = torch.tensor([1, 0.5]) >>> torch.digamma(a) tensor([-0.5772, -1.9635])
此页内容是否对您有帮助
感谢反馈!