keras2caffe
keras2caffe copied to clipboard
Exception: Unsupported layer type: ReLU
trying the code with MobileNet, I face the following error;
Traceback (most recent call last):
File "convert.py", line 35, in <module>
keras2caffe.convert(keras_model, caffe_proto, caffe_weights)
File "../../keras2caffe/convert.py", line 390, in convert
raise Exception('Unsupported layer type: '+layer_type)
Exception: Unsupported layer type: ReLU
Is there any fix for this layer? Cheers,
The script convert.py is basically a long series of ifs and elifs. The error message means that there is no "if layer_type=='ReLU'". You can add this and the correct line for adding the right caffe layer.
However, there is a "if layer_type=='Activation'" (line 273), so you could change the ReLU layer in your keras code to an activation layer with activation function ReLU.