未验证 提交 e53119f5 编写于 作者: H Hongyu Liu 提交者: GitHub

Fix decayed adagrad example (#17390)

* fix DecayedAdagrad example;
test=develop
test=document_preview

* add space; test=develop
上级 326bf829
......@@ -1427,6 +1427,13 @@ class DecayedAdagradOptimizer(Optimizer):
Examples:
.. code-block:: python
import paddle.fluid as fluid
import paddle.fluid.layers as layers
from paddle.fluid.optimizer import DecayedAdagrad
x = layers.data( name='x', shape=[-1, 10], dtype='float32' )
trans = layers.fc( x, 100 )
cost = layers.reduce_mean( trans )
optimizer = fluid.optimizer.DecayedAdagrad(learning_rate=0.2)
optimizer.minimize(cost)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册