From d86b2e1843b311c8da5a1021690bfbe9c21967ff Mon Sep 17 00:00:00 2001 From: zhangyi Date: Sat, 26 Mar 2022 14:12:34 +0800 Subject: [PATCH] correct the formula format --- tutorials/source_en/beginner/autograd.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tutorials/source_en/beginner/autograd.md b/tutorials/source_en/beginner/autograd.md index 6fead1c1c0..4fc41ed017 100644 --- a/tutorials/source_en/beginner/autograd.md +++ b/tutorials/source_en/beginner/autograd.md @@ -14,10 +14,8 @@ This chapter uses `ops.GradOperation` in MindSpore to find first-order derivativ ## First-order Derivative of the Input -The formula needs to be defined before the input can be derived: -$$ -f(x)=wx+b \tag {1} -$$ +The formula needs to be defined before the input can be derived: $f(x)=wx+b \tag {1}$ + The example code below is an expression of Equation (1), and since MindSpore is functionally programmed, all expressions of computational formulas are represented as functions. ```python @@ -36,10 +34,7 @@ class Net(nn.Cell): return f ``` -Define the derivative class `GradNet`. In the `__init__` function, define the `self.net` and `ops.GradOperation` networks. In the `construct` function, compute the derivative of `self.net`. Its corresponding MindSpore internally produces the following formula (2): -$$ -f^{'}(x)=w\tag {2} -$$ +Define the derivative class `GradNet`. In the `__init__` function, define the `self.net` and `ops.GradOperation` networks. In the `construct` function, compute the derivative of `self.net`. Its corresponding MindSpore internally produces the following formula (2): $f^{'}(x)=w\tag {2}$ ```python from mindspore import dtype as mstype -- Gitee