-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Module 'keras.utils.generic_utils' has no attribute 'get_custom_objects' #559
Comments
The same to me: /usr/local/lib/python3.8/dist-packages/efficientnet/init.py in init_keras_custom_objects() "AttributeError: module 'keras.utils.generic_utils' has no attribute 'get_custom_objects'" |
|
!pip install tensorflow==2.9.0 also works - thanks |
It worked! Thanks! |
Installing an older TF/Keras version is just a workaround. |
I am using tensorflow 2.12 and got this to work by setting the env variable SM_FRAMEWORK="tf.keras" |
Thanks for this @lucaslcode ! Was having trouble deploying an image segmentation model on hugging faces. I'd like to add to this. When I ran the code in Google Colab, I replaced all the instances of 'init_keras_custom_objects' in keras.py with 'init_tfkeras_custom_objects' and got it running on there and used tensorflow 2.11.0
|
Hi |
Thank you, that is my current solution. |
A few days ago, I can still use it however today when I import segmentation_models this happened. I wander how can I fix this?
The text was updated successfully, but these errors were encountered: