未验证 提交 d8cd6c54 编写于 作者: A Aurelius84 提交者: GitHub

Synchronize Chinese and English documents test=develop (#1953)

上级 99e584ed
......@@ -26,7 +26,7 @@ gradients
import paddle.fluid as fluid
x = fluid.layers.data(name='x', shape=[2,8,8], dtype='float32')
x = fluid.data(name='x', shape=[None,2,8,8], dtype='float32')
x.stop_gradient=False
y = fluid.layers.conv2d(x, 4, 1, bias_attr=False)
y = fluid.layers.relu(y)
......
......@@ -23,7 +23,7 @@ program_guard
main_program = fluid.Program()
startup_program = fluid.Program()
with fluid.program_guard(main_program, startup_program):
data = fluid.layers.data(name='image', shape=[784, 784], dtype='float32')
data = fluid.data(name='image', shape=[None, 784, 784], dtype='float32')
hidden = fluid.layers.fc(input=data, size=10, act='relu')
例如,当组的网不需要startup_program初始化各变量时,可以传入一个临时的program。
......@@ -36,5 +36,5 @@ program_guard
main_program = fluid.Program()
# 如果您不需要关心startup program,传入一个临时值即可
with fluid.program_guard(main_program, fluid.Program()):
data = fluid.layers.data(name='image', shape=[784, 784], dtype='float32')
data = fluid.data(name='image', shape=[None, 784, 784], dtype='float32')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册