mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Fix mvlgamma doc (#17045)
Summary: Changelog: - Fix the constant in the docs Pull Request resolved: https://github.com/pytorch/pytorch/pull/17045 Differential Revision: D14068698 Pulled By: ezyang fbshipit-source-id: af040b9a9badea213785f5bf3b6daf4d90050eb2
This commit is contained in:
parent
f79563a665
commit
86594e63eb
|
|
@ -3159,12 +3159,12 @@ add_docstr(torch.mvlgamma,
|
|||
r"""
|
||||
mvlgamma(input, p) -> Tensor
|
||||
|
||||
Computes the multivariate log-gamma function with dimension :math:`p` element-wise, given by
|
||||
Computes the multivariate log-gamma function (`[reference]`_) with dimension :math:`p` element-wise, given by
|
||||
|
||||
.. math::
|
||||
\log(\Gamma_{p}(a)) = C + \displaystyle \sum_{i=1}^{p} \log\left(\Gamma\left(a - \frac{i - 1}{2}\right)\right)
|
||||
|
||||
where :math:`C = \log(\pi) \times \frac{p (p - 1)}{2}` and :math:`\Gamma(\cdot)` is the Gamma function.
|
||||
where :math:`C = \log(\pi) \times \frac{p (p - 1)}{4}` and :math:`\Gamma(\cdot)` is the Gamma function.
|
||||
|
||||
If any of the elements are less than or equal to :math:`\frac{p - 1}{2}`, then an error
|
||||
is thrown.
|
||||
|
|
@ -3182,6 +3182,8 @@ Example::
|
|||
>>> torch.mvlgamma(a, 2)
|
||||
tensor([[0.3928, 0.4007, 0.7586],
|
||||
[1.0311, 0.3901, 0.5049]])
|
||||
|
||||
.. _`[reference]`: https://en.wikipedia.org/wiki/Multivariate_gamma_function
|
||||
""")
|
||||
|
||||
add_docstr(torch.narrow,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user