diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 4b34c365aa4474bc5418f0fea715bc63d93a9920..a536c0b839421bb297e8e0caa2f21e84f2daa863 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -5556,6 +5556,12 @@ def reshape(x, shape, actual_shape=None, act=None, inplace=False, name=None): dim = fluid.layers.fill_constant([1], "int32", 5) reshaped_2 = fluid.layers.reshape(data_2, shape=[dim, 10]) # the shape of reshaped_2 is [5,10]. + + # example 3: + data_3 = fluid.data( + 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]. """ if in_dygraph_mode(): #TODO(zhiqiu): open inplace if we can.