Browse Source

modify the doc to make the formulas aligned

tags/v1.1.0
peixu_ren 5 years ago
parent
commit
d508da25a9
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      mindspore/nn/layer/math.py

+ 5
- 5
mindspore/nn/layer/math.py View File

@@ -162,11 +162,11 @@ class LGamma(Cell):
The algorithm is:

.. math::
lgamma(z + 1) = \frac{(\log(2) + \log(pi))}{2} + (z + 1/2) * log(t(z)) - t(z) + A(z)
t(z) = z + kLanczosGamma + 1/2
A(z) = kBaseLanczosCoeff + \sum_{k=1}^n \frac{kLanczosCoefficients[i]}{z + k}
\begin{array}{ll} \\
lgamma(z + 1) = \frac{(\log(2) + \log(pi))}{2} + (z + 1/2) * log(t(z)) - t(z) + A(z) \\
t(z) = z + kLanczosGamma + 1/2 \\
A(z) = kBaseLanczosCoeff + \sum_{k=1}^n \frac{kLanczosCoefficients[i]}{z + k}
\end{array}

However, if the input is less than 0.5 use Euler's reflection formula:



Loading…
Cancel
Save