-
Notifications
You must be signed in to change notification settings - Fork 161
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
Cannot import name relu6 #6
Comments
yes, if you use keras2.2 . |
I think in keras mobilenet implement are moving place, Personally I replace, The reason I uese DepthswiseConv2D from layers Also It seems keras 2.2 has its own mobilenet-v2 implement. |
Had the same issue, this worked for me: from keras import models model = models.load_model(path_model_checkpoint, custom_objects={'relu6': mobilenet_v2.relu6}) Had the idea for the fix from here: keras-team/keras@468f080 |
@jmherrmann Still not work AttributeError: module 'keras_applications.mobilenet_v2' has no attribute 'relu6' can you help me with it? |
Which Keras version are you on @BokaiLIAN? |
I have solved the problem by reinstall keras=2.1.4 |
In keras 2.2, you can open the mobilenet_v2.py file in the keras_applications folder to find how to use relu6 rightly. In fact, you only need replace the Activation('relu6')(x) of mobilenet_v2.layers.ReLU(6.)(x). |
As I reinstall keras=2.1.5, the backend is set to theano, but I cannot change the backend! why??? Anyone solved this issue?? How ?? |
I have tried but I got the following error: my TF is 1.11 my keras is 2.2.4, python 2.7. |
Why not use SeparableConv2D instead DepthConv2D and a relu with parameter max_value ? |
There seems to be some name changes since you write the script.
The text was updated successfully, but these errors were encountered: