Skip to content

Commit 0821429

Browse files
authored
Update AdamW_cn.rst
1 parent a5d0c27 commit 0821429

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/api/paddle/optimizer/AdamW_cn.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ AdamW
88
99
1010
11-
AdamW优化器出自 `DECOUPLED WEIGHT DECAY REGULARIZATION 论文 <https://arxiv.org/pdf/1711.05101.pdf>`,用来解决 :ref:`Adam <_cn_api_paddle_optimizer_Adam>` 优化器中L2正则化失效的问题。
11+
AdamW优化器出自 `DECOUPLED WEIGHT DECAY REGULARIZATION 论文 <https://arxiv.org/pdf/1711.05101.pdf>`用来解决 :ref:`Adam <_cn_api_paddle_optimizer_Adam>` 优化器中L2正则化失效的问题。
1212

1313
其参数更新的计算公式如下:
1414

@@ -43,7 +43,7 @@ AdamW优化器出自 `DECOUPLED WEIGHT DECAY REGULARIZATION 论文 <https://arxi
4343
默认值为None,此时将不进行梯度裁剪。
4444
- **lazy_mode** (bool,可选) - 设为True时,仅更新当前具有梯度的元素。官方Adam算法有两个移动平均累加器(moving-average accumulators)。累加器在每一步都会更新。在密集模式和稀疏模式下,两条移动平均线的每个元素都会更新。如果参数非常大,那么更新可能很慢。 lazy mode仅更新当前具有梯度的元素,所以它会更快。但是这种模式与原始的算法有不同的描述,可能会导致不同的结果,默认为False。
4545
- **multi_precision** (bool,可选) – 在基于GPU设备的混合精度训练场景中,该参数主要用于保证梯度更新的数值稳定性。设置为True时,优化器会针对FP16类型参数保存一份与其值相等的FP32类型参数备份。梯度更新时,首先将梯度类型提升到FP32,然后将其更新到FP32类型参数备份中。最后,更新后的FP32类型值会先转换为FP16类型,再赋值给实际参与计算的FP16类型参数。默认为False。
46-
- **name** (str, 可选)- 该参数供开发人员打印调试信息时使用,具体用法请参见 :ref:`api_guide_Name` ,默认值为None。
46+
- **name** (str可选)- 该参数供开发人员打印调试信息时使用,具体用法请参见 :ref:`api_guide_Name` ,默认值为None。
4747

4848

4949
代码示例
@@ -99,7 +99,7 @@ step()
9999
'''''''''
100100

101101
.. note::
102-
1. 该API只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
102+
该API只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
103103

104104
执行一次优化器并进行参数更新。
105105

@@ -165,7 +165,7 @@ clear_grad()
165165
'''''''''
166166

167167
.. note::
168-
1. 该API只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
168+
该API只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
169169

170170

171171
清除需要优化的参数的梯度。
@@ -190,7 +190,7 @@ set_lr(value)
190190
'''''''''
191191

192192
.. note::
193-
1. 该API只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
193+
该API只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
194194

195195
手动设置当前 ``optimizer`` 的学习率。当使用_LRScheduler时,无法使用该API手动设置学习率,因为这将导致冲突。
196196

@@ -229,7 +229,7 @@ get_lr()
229229
'''''''''
230230

231231
.. note::
232-
1. 该API只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
232+
该API只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
233233

234234
获取当前步骤的学习率。当不使用_LRScheduler时,每次调用的返回值都相同,否则返回当前步骤的学习率。
235235

0 commit comments

Comments
 (0)