From a28df3eb0b874168abb00809ffe5715c426b010e Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Wed, 26 Dec 2018 07:52:12 +0800 Subject: [PATCH] Fix the unstack layer (#15047) test=develop --- python/paddle/fluid/layers/nn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index bdfcc8c4e2..489433cff5 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -7943,7 +7943,7 @@ def unstack(x, axis=0, num=None): num = x.shape[axis] outs = [] - for _ in num: + for _ in range(num): outs.append(helper.create_variable_for_type_inference(x.dtype)) helper.append_op( -- GitLab