未验证 提交 3416c359 编写于 作者: Z Zhang Ting 提交者: GitHub

refine doc of default_startup_program, test=document_fix (#28951)

上级 842fd293
...@@ -5382,13 +5382,8 @@ def default_startup_program(): ...@@ -5382,13 +5382,8 @@ def default_startup_program():
import paddle import paddle
paddle.enable_static() paddle.enable_static()
main_program = paddle.static.Program()
startup_program = paddle.static.Program()
with paddle.static.program_guard(main_program=main_program, startup_program=startup_program):
x = paddle.static.data(name="x", shape=[-1, 784], dtype='float32') x = paddle.static.data(name="x", shape=[-1, 784], dtype='float32')
y = paddle.static.data(name="y", shape=[-1, 1], dtype='int32') out = paddle.static.nn.fc(name="fc", x=x, size=10, activation="relu")
z = paddle.static.nn.fc(name="fc", x=x, size=10, activation="relu")
print("main program is: {}".format(paddle.static.default_main_program())) print("main program is: {}".format(paddle.static.default_main_program()))
print("start up program is: {}".format(paddle.static.default_startup_program())) print("start up program is: {}".format(paddle.static.default_startup_program()))
""" """
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册