From d508da25a9bc808b2ec519244903e50a9af73e28 Mon Sep 17 00:00:00 2001 From: peixu_ren Date: Mon, 14 Dec 2020 17:16:09 -0500 Subject: [PATCH] modify the doc to make the formulas aligned --- mindspore/nn/layer/math.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mindspore/nn/layer/math.py b/mindspore/nn/layer/math.py index 8b97b8a42f..ca0f0091aa 100644 --- a/mindspore/nn/layer/math.py +++ b/mindspore/nn/layer/math.py @@ -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: