I am trying to add two layers each of size (None, 24, 24, 8)
but getting the class error as below:
Code:
x = add([layers[i-1],layers[i-9]])
or
x = Add()([layers[i-1],layers[i-9]])
Error:
/keras_222/local/lib/python2.7/site-packages/keras/engine/base_layer.py", line 285, in assert_input_compatibility
str(inputs) + '. All inputs to the layer '
ValueError: Layer add_1 was called with an input that isn't a symbolic tensor. **Received type: <class** 'keras.layers.normalization.BatchNormalization'>. Full input: [<keras.layers.normalization.BatchNormalization object at 0x7f04e4085850>, <keras.layers.normalization.BatchNormalization object at 0x7f050013cd10>]. All inputs to the **layer should be tensors**.
Please advise how to move forward. I also tried putting axis=1 or axis=-1 but it didn't work.
x = Add()([layers[i-1],layers[i-9]],axis=1)
or
x = Add()([layers[i-1],layers[i-9]], axis=-1)