ValueError: Keras layer '<class 'keras.legacy.layers.Merge'>' not supported.

Hi,


I created model using RESNET model. It have merger layer as well. But when i tried to convert using coremltools lib. It started showing error


........../coremltools/converters/keras/_keras2_converter.py", line 90, in _check_unsupported_layers

"Keras layer '%s' not supported. " % str(type(layer)))

ValueError: Keras layer '<class 'keras.legacy.layers.Merge'>' not supported.


Whats wrong ?? Or it is not able to support Merge layer.


Thanks

Replies

The error message is pretty clear: the Merge layer is not supported by coremltools and Core ML.


This Merge layer is an old layer type. I think it has been replaced by the Concatenate layer (which _is_ supported by Core ML). So if you replace the Merge layers with Concatenate in your model, coremltools should be able to convert it.