From 1c1e5ffb1a5b83ab10d4b2571149584b39bacec3 Mon Sep 17 00:00:00 2001 From: guosheng Date: Tue, 16 Oct 2018 17:25:33 +0800 Subject: [PATCH] Fix the example in the doc of transpose_op. test=develop --- python/paddle/fluid/layers/nn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index f4e1c0d96aa..cc6b92c06f0 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -4212,7 +4212,10 @@ def transpose(x, perm, name=None): Examples: .. code-block:: python - x = fluid.layers.data(name='x', shape=[5, 10, 15], dtype='float32') + # use append_batch_size=False to avoid prepending extra + # batch size in shape + x = fluid.layers.data(name='x', shape=[5, 10, 15], + dtype='float32', append_batch_size=False) x_transposed = layers.transpose(x, perm=[1, 0, 2]) """ -- GitLab