Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify clip #5080

Merged
merged 2 commits into from
Jul 15, 2022
Merged

modify clip #5080

merged 2 commits into from
Jul 15, 2022

Conversation

betterpig
Copy link
Contributor

@betterpig betterpig commented Jul 14, 2022

优化梯度裁剪文档。

@paddle-bot
Copy link

paddle-bot bot commented Jul 14, 2022

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5080.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:[Beta]飞桨文档预览工具

@paddle-bot
Copy link

paddle-bot bot commented Jul 14, 2022

✅ This PR's description meets the template requirements!
Please wait for other CI results.

Copy link
Collaborator

@momozi1996 momozi1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意公式中的字母使用公式写法,并且公式中的符号在文字说明中保持一致,辛苦再改一下。

@@ -6,7 +6,7 @@

在深度学习模型的训练过程中,通过梯度下降算法更新网络参数。一般地,梯度下降算法分为前向传播和反向更新两个阶段。

- 在前向传播阶段,输入向量使用下列公式,从前往后,计算下一层每个神经元的值。其中,O为神经元的输入和输出,f为激活函数,W为权重,b为偏置。
在 **前向传播阶段** ,输入向量使用下列公式,从前往后,计算下一层每个神经元的值。其中,O为神经元的输入和输出,f为激活函数,W为权重,b为偏置。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请注意:O,f,W,b用数学公式,保持上下文一致。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经把变量都改为和公式形式一致。

@@ -142,7 +145,7 @@
\\global\_norm=\sqrt{\sum_{i=0}^{n-1}(norm(X[i]))^2}\\


其中 :math:`X_i` 为梯度向量,clip_norm 为设置的L2范数阈值, :math:`norm(X)` 代表 :math:`X` 的L2范数,global_norm 为所有梯度向量的L2范数的均方根值。
:math:`X_i` 为梯度向量,clip_norm 为设置的L2范数阈值, :math:`norm(X)` 代表 :math:`X` 的L2范数,global_norm 为所有梯度向量的L2范数的均方根值。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意:x保持一致:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

@momozi1996 momozi1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@betterpig betterpig merged commit 22c9901 into PaddlePaddle:develop Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants