未验证 提交 97e87d2d 编写于 作者: Z zhangjingwei 提交者: GitHub

修改COPY-FROM No. 15 regularizer (#54926)

上级 413d1abf
......@@ -65,6 +65,7 @@ class L1Decay(WeightDecayRegularizer):
Examples:
.. code-block:: python
:name: code-example1
# Example1: set Regularizer in optimizer
import paddle
......@@ -84,6 +85,9 @@ class L1Decay(WeightDecayRegularizer):
momentum.step()
momentum.clear_grad()
.. code-block:: python
:name: code-example2
# Example2: set Regularizer in parameters
# Set L1 regularization in parameters.
# Global regularizer does not take effect on my_conv2d for this case.
......@@ -172,6 +176,7 @@ class L2Decay(WeightDecayRegularizer):
Examples:
.. code-block:: python
:name: code-example1
# Example1: set Regularizer in optimizer
import paddle
......@@ -190,6 +195,8 @@ class L2Decay(WeightDecayRegularizer):
momentum.step()
momentum.clear_grad()
.. code-block:: python
:name: code-example2
# Example2: set Regularizer in parameters
# Set L2 regularization in parameters.
# Global regularizer does not take effect on my_conv2d for this case.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册