Skip to content

Commit 2df6113

Browse files
authored
[Docathon][Fix note No.15-16] (#7162)
1 parent 3bc4b53 commit 2df6113

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

docs/api/paddle/optimizer/Adam_cn.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ step()
6060
'''''''''
6161

6262
.. note::
63-
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
63+
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
6464

6565
执行一次优化器并进行参数更新。
6666

@@ -74,7 +74,7 @@ step()
7474
COPY-FROM: paddle.optimizer.Adam.step
7575

7676
append_regularization_ops(parameters_and_grads, regularization=None)
77-
'''''''''
77+
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
7878
创建并添加反向正则化算子,该操作将正则化函数的梯度添加到参数的梯度中并返回修改后的梯度。
7979

8080
**参数**
@@ -91,7 +91,7 @@ append_regularization_ops(parameters_and_grads, regularization=None)
9191
list[(Variable, Variable)]
9292

9393
minimize(loss, startup_program=None, parameters=None, no_grad_set=None)
94-
'''''''''
94+
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
9595

9696
为网络添加反向计算过程,并根据反向计算所得的梯度,更新 parameters 中的 Parameters,最小化网络损失值 loss。
9797

@@ -112,10 +112,10 @@ minimize(loss, startup_program=None, parameters=None, no_grad_set=None)
112112
COPY-FROM: paddle.optimizer.Adam.minimize
113113

114114
clear_grad()
115-
'''''''''
115+
''''''''''''''''''
116116

117117
.. note::
118-
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
118+
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
119119

120120

121121
清除需要优化的参数的梯度。
@@ -125,11 +125,11 @@ clear_grad()
125125
COPY-FROM: paddle.optimizer.Adam.clear_grad
126126

127127
set_lr(value)
128-
'''''''''
128+
''''''''''''''''''
129129

130130
.. note::
131131

132-
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
132+
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
133133

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

@@ -146,11 +146,11 @@ set_lr(value)
146146
COPY-FROM: paddle.optimizer.Adam.set_lr
147147

148148
set_lr_scheduler(scheduler)
149-
'''''''''
149+
''''''''''''''''''''''''''''''''''''
150150

151151
.. note::
152152

153-
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
153+
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
154154

155155
手动设置当前 ``optimizer`` 的学习率为 LRScheduler 类。
156156

@@ -170,7 +170,7 @@ get_lr()
170170
'''''''''
171171

172172
.. note::
173-
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
173+
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
174174

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

@@ -184,7 +184,7 @@ float,当前步骤的学习率。
184184
COPY-FROM: paddle.optimizer.Adam.get_lr
185185

186186
set_state_dict(state_dict)
187-
'''''''''
187+
''''''''''''''''''''''''''''''''''''
188188

189189
加载优化器状态词典,对于 Adam 优化器,包含 beta1,beta2,momentum 等。如果使用 LRScheduler,global_step 将会改变。
190190

@@ -201,7 +201,7 @@ set_state_dict(state_dict)
201201
COPY-FROM: paddle.optimizer.Adam.set_state_dict
202202

203203
state_dict(state_dict)
204-
'''''''''
204+
'''''''''''''''''''''''''''
205205

206206
从优化器中获取 state_dict 信息,其中包含所有优化器所需的值,对于 Adam 优化器,包含 beta1,beta2,momentum 等。
207207
如果使用 LRScheduler,global_step 将被包含在 state_dict 内。如果优化器未被调用 minimize 函数,state_dict 将为空。

docs/api/paddle/optimizer/Adamax_cn.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ COPY-FROM: paddle.optimizer.Adamax
5353
方法
5454
::::::::::::
5555
step()
56-
'''''''''
56+
''''''''''''
5757

5858
.. note::
5959

60-
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
60+
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
6161

6262
执行一次优化器并进行参数更新。
6363

@@ -71,7 +71,7 @@ step()
7171
COPY-FROM: paddle.optimizer.Adamax.step
7272

7373
minimize(loss, startup_program=None, parameters=None, no_grad_set=None)
74-
'''''''''
74+
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
7575

7676
为网络添加反向计算过程,并根据反向计算所得的梯度,更新 parameters 中的 Parameters,最小化网络损失值 loss。
7777

@@ -92,11 +92,11 @@ COPY-FROM: paddle.optimizer.Adamax.minimize
9292

9393

9494
clear_grad()
95-
'''''''''
95+
''''''''''''''''''
9696

9797
.. note::
9898

99-
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
99+
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
100100

101101

102102
清除需要优化的参数的梯度。
@@ -106,11 +106,11 @@ clear_grad()
106106
COPY-FROM: paddle.optimizer.Adamax.clear_grad
107107

108108
set_lr(value)
109-
'''''''''
109+
''''''''''''''''''
110110

111111
.. note::
112112

113-
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
113+
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
114114

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

@@ -127,11 +127,11 @@ set_lr(value)
127127
COPY-FROM: paddle.optimizer.Adamax.set_lr
128128

129129
set_lr_scheduler(scheduler)
130-
'''''''''
130+
''''''''''''''''''''''''''''''''''''
131131

132132
.. note::
133133

134-
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
134+
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
135135

136136
手动设置当前 ``optimizer`` 的学习率为 LRScheduler 类。
137137

@@ -148,11 +148,11 @@ set_lr_scheduler(scheduler)
148148
COPY-FROM: paddle.optimizer.Adamax.set_lr_scheduler
149149

150150
get_lr()
151-
'''''''''
151+
'''''''''''''
152152

153153
.. note::
154154

155-
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
155+
该 API 只在 `Dygraph <../../user_guides/howto/dygraph/DyGraph.html>`_ 模式下生效。
156156

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

0 commit comments

Comments
 (0)