PyTorch
torch / torch
torch.mvlgamma¶
-
torch.
mvlgamma
(input, p) → Tensor¶ Computes the multivariate log-gamma function) with dimension p element-wise, given by
log(Γp(a))=C+i=1∑plog(Γ(a−2i−1))where C=log(π)×4p(p−1) and Γ(⋅) is the Gamma function.
All elements must be greater than 2p−1 , otherwise an error would be thrown.
- Parameters
Example:
>>> a = torch.empty(2, 3).uniform_(1, 2) >>> a tensor([[1.6835, 1.8474, 1.1929], [1.0475, 1.7162, 1.4180]]) >>> torch.mvlgamma(a, 2) tensor([[0.3928, 0.4007, 0.7586], [1.0311, 0.3901, 0.5049]])
此页内容是否对您有帮助
感谢反馈!