未验证 提交 5d39608a 编写于 作者: T tangwei12 提交者: GitHub

fix code, test=develop (#1823)

上级 fd7317cf
...@@ -204,8 +204,8 @@ save_vars、save_params、save_persistables 以及 save_inference_model的区别 ...@@ -204,8 +204,8 @@ save_vars、save_params、save_persistables 以及 save_inference_model的区别
path = "./models" path = "./models"
startup_prog = fluid.default_startup_program() startup_prog = fluid.default_startup_program()
exe.run(startup_prog) exe.run(startup_prog)
fluid.io.load_persistables(exe, path, startup_prog)
main_prog = fluid.default_main_program() main_prog = fluid.default_main_program()
fluid.io.load_persistables(exe, path, main_prog)
exe.run(main_prog) exe.run(main_prog)
上面的例子中,通过调用 :code:`fluid.io.load_persistables` 函数,PaddlePaddle Fluid会从默认 上面的例子中,通过调用 :code:`fluid.io.load_persistables` 函数,PaddlePaddle Fluid会从默认
......
...@@ -126,8 +126,8 @@ In the above example, by calling the :code:`fluid.io.save_persistables` function ...@@ -126,8 +126,8 @@ In the above example, by calling the :code:`fluid.io.save_persistables` function
path = "./models" path = "./models"
startup_prog = fluid.default_startup_program() startup_prog = fluid.default_startup_program()
exe.run(startup_prog) exe.run(startup_prog)
fluid.io.load_persistables(exe, path, startup_prog)
main_prog = fluid.default_main_program() main_prog = fluid.default_main_program()
fluid.io.load_persistables(exe, path, main_prog)
exe.run(main_prog) exe.run(main_prog)
In the above example, by calling the :code:`fluid.io.load_persistables` function, PaddlePaddle Fluid will find persistable variables from all model variables in the default :code:`fluid.Program` , e.t. :code:`prog` . and load them one by one from the specified :code:`path` directory to continue training. In the above example, by calling the :code:`fluid.io.load_persistables` function, PaddlePaddle Fluid will find persistable variables from all model variables in the default :code:`fluid.Program` , e.t. :code:`prog` . and load them one by one from the specified :code:`path` directory to continue training.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册