keras 2.0 concat error in ssd.train ipython
When I code the ssd.train.ipython in notebook, the follwing error will appear, i has upgrade the keras 2.0 version: ValueError: "concat" mode can only merge layers with matching output shapes except for the concat axis. Layer shapes: [(None, 38, 38, 512), (None, 19, 19, 1024), (None, 10, 10, 512), (None, 5, 5, 256), (None, 3, 3, 256), (None, 1, 1, 256)]
@hzycn you need to rename get_output_shape to compute_output_shape in custom layers. However there might be other issues, as the implementation was not tested with Keras 2 api.
Thank you @rykov8 , I changed the get_output_shape to computer_output_shape in ssd_layers.py, but it still appears same issues.
@hzycn is it a missprint in your comment? You need compute_output_shape, not computer_output_shape
Works after @rykov8 suggestion implemented, and it seems to be only necessary change.
i'm having the same issue. not sure i am interpreting the suggested fix correctly though:
in Class PriorBox
change: def get_output_shape_for(self, input_shape): to def compute_output_shape_for(self, input_shape):
???
@BenMacKenzie not exactly. You need to rename
def get_output_shape_for(self, input_shape):
...
to
def compute_output_shape(self, input_shape):
...
It's just a Keras 2.0 change in API.