From 5e216fcf1a37c0dbeb26a2846e49c408b618b92d Mon Sep 17 00:00:00 2001 From: tink2123 Date: Tue, 23 Apr 2019 04:19:19 +0000 Subject: [PATCH] fix split 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 6bf437b4dfb..cd3b7354ed9 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -4883,7 +4883,7 @@ def split(input, num_or_sections, dim=-1, name=None): assert num_or_sections > 1, 'num_or_sections must be more than 1.' num = num_or_sections else: - assert len(num_or_sections) < input_shape[ + assert len(num_or_sections) <= input_shape[ dim], 'len(num_or_sections) must not be more than input.shape[dim].' num = len(num_or_sections) outs = [ -- GitLab