diff --git a/keras/layers/core.py b/keras/layers/core.py index 63f43359f17..ba63b1fd674 100644 --- a/keras/layers/core.py +++ b/keras/layers/core.py @@ -566,6 +566,11 @@ def get_output_shape_for(self, input_shape): else: return K.int_shape(x) # otherwise, we default to the input shape + warnings.warn('`output_shape` argument not specified for layer {} ' + 'and cannot be automatically inferred with the Theano backend. ' + 'Defaulting to output shape `{}` (same as input shape). ' + 'If the expected output shape is different, specify it via the `output_shape` argument.' + .format(self.name, input_shape)) return input_shape elif type(self._output_shape) in {tuple, list}: if type(input_shape) is list: