Skip to content

Commit

Permalink
fix doc of save load (PaddlePaddle#2888)
Browse files Browse the repository at this point in the history
* update install doc for windows 2.0.rc

* fix 2.0 API doc of lr scheduler

* fix 2.0 API doc

* fix chinese doc of save/load

* fix chinese doc of save/load
  • Loading branch information
zhwesky2010 authored Nov 16, 2020
1 parent 7d607ba commit c93028b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions doc/paddle/api/paddle/framework/io/load_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ Object,一个可以在paddle中使用的对象实例
.. code-block:: python
import paddle
paddle.disable_static()
emb = paddle.nn.Embedding(10, 10)
layer_state_dict = emb.state_dict()
paddle.save(layer_state_dict, "emb.pdparams")
scheduler = paddle.optimizer.lr_scheduler.NoamLR(
scheduler = paddle.optimizer.lr.NoamDecay(
d_model=0.01, warmup_steps=100, verbose=True)
adam = paddle.optimizer.Adam(
learning_rate=scheduler,
Expand Down
4 changes: 1 addition & 3 deletions doc/paddle/api/paddle/framework/io/save_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ save
import paddle
paddle.disable_static()
emb = paddle.nn.Embedding(10, 10)
layer_state_dict = emb.state_dict()
paddle.save(layer_state_dict, "emb.pdparams")
scheduler = paddle.optimizer.lr_scheduler.NoamLR(
scheduler = paddle.optimizer.lr.NoamDecay(
d_model=0.01, warmup_steps=100, verbose=True)
adam = paddle.optimizer.Adam(
learning_rate=scheduler,
Expand Down

0 comments on commit c93028b

Please sign in to comment.