Error: When converting models with Deconvolution and Dilated convolution layers

Hi,

This quetion is related to CoreML custom model conversion. I have recently re-implemented two of my networks into Keras 1.2.2 format. For testing purposes, I designed a simple Deep CNNs for MNIST and the model got converted without issues. When I tried to convert my network with Dilated Convolution layers, coremltools is generating the following error -


```

>>> coreml_model = coremltools.converters.keras.convert(model)

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "//anaconda/envs/coreml/lib/python2.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 278, in convert

_check_unsupported_layers(model)

File "//anaconda/envs/coreml/lib/python2.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 79, in _check_unsupported_layers

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

ValueError: Keras layer '<class 'keras.layers.convolutional.AtrousConvolution2D'>' not supported.

```


To verify, I checked the documentation of coremltools - http://pythonhosted.org/coremltools/generated/coremltools.models.neural_network.html#coremltools.models.neural_network.NeuralNetworkBuilder - and I didn't observe any mentioning related to Deconvolution and Dilated Convolutions. Did anyone find a solution to this problem?


To CoreML team: I am interested to know if there will be any support for those layers in your future release?

Accepted Answer

Hi, thanks for trying out CoreML Beta!


In the beta release we support Deconvolution as a parameter in convolution. There's an argument called "is_deconv" to set the layer as a regular convolution / deconvolution. CoreML framework supports dilated convolution, but coremltools (version 0.3.0) do not expose this option. This is a known issue, and we're fixing it in upcoming release. Please stay tuned!

Great to know! Thanks for your reply. Can you please let me know about the expected date for release of next version of CoreML with these features? 🙂

Error: When converting models with Deconvolution and Dilated convolution layers
 
 
Q