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

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

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