Set stacklevel so warning points to invocation instead of warning
@@ -66,7 +66,7 @@ class Merge(Layer):
warnings.warn('The `Merge` layer is deprecated '
'and will be removed after 08/2017. '
'Use instead layers from `keras.layers.merge`, '
- 'e.g. `add`, `concatenate`, etc.')
+ 'e.g. `add`, `concatenate`, etc.', stacklevel=2)
self.layers = layers
self.mode = mode
self.concat_axis = concat_axis
@@ -429,7 +429,7 @@ def merge(inputs, mode='sum', concat_axis=-1,
warnings.warn('The `merge` function is deprecated '
'and will be removed after 08/2017. '
'Use instead layers from `keras.layers.merge`, '
- 'e.g. `sum`, `concatenate`, etc.')
+ 'e.g. `sum`, `concatenate`, etc.', stacklevel=2)
all_keras_tensors = True
for x in inputs:
if not hasattr(x, '_keras_history'):
