diff --git a/keras/layers/merge.py b/keras/layers/merge.py index d59aeeb6697..8c65f9feb46 100644 --- a/keras/layers/merge.py +++ b/keras/layers/merge.py @@ -330,9 +330,9 @@ def __init__(self, axis=-1, **kwargs): def build(self, input_shape): # Used purely for shape validation. - if not isinstance(input_shape, list): + if not isinstance(input_shape, list) or len(input_shape) < 2: raise ValueError('`Concatenate` layer should be called ' - 'on a list of inputs') + 'on a list of of at least 2 inputs') if all([shape is None for shape in input_shape]): return reduced_inputs_shapes = [list(shape) for shape in input_shape]