Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Unsupported layer type: ReLU #24

Open
mrgransky opened this issue Aug 11, 2020 · 1 comment
Open

Exception: Unsupported layer type: ReLU #24

mrgransky opened this issue Aug 11, 2020 · 1 comment

Comments

@mrgransky
Copy link

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,

@JayDommaschk
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants