未验证 提交 ee94b105 编写于 作者: M mapingshuo 提交者: GitHub

test=document_preview (#1961)

上级 59545fef
......@@ -54,10 +54,10 @@ reshape
# example 1:
# attr shape is a list which doesn't contain tensor Variable.
data_1 = fluid.layers.data(
name='data_1', shape=[2, 4, 6], dtype='float32')
data_1 = fluid.data(
name='data_1', shape=[2, 4, 6], dtype='float32')
reshaped_1 = fluid.layers.reshape(
x=data_1, shape=[-1, 0, 3, 2], inplace=True)
x=data_1, shape=[-1, 0, 3, 2], inplace=True)
# the shape of reshaped_1 is [2,4,3,2].
# example 2:
......@@ -69,7 +69,7 @@ reshape
# example 3:
data_3 = fluid.data(
name="data_3", shape=[2,4,6], dtype='float32')
name="data_3", shape=[2,4,6], dtype='float32')
reshaped_3 = fluid.layers.reshape(x=data_3, shape=[6,8])
# the shape of reshaped_3 is [6,8].
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册