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

module 'keras.utils.generic_utils' has no attribute 'get_custom_objects' #570

Open
Rakshith2202 opened this issue Jun 15, 2023 · 4 comments

Comments

@Rakshith2202
Copy link

This is the error I am getting when I am trying to import segmentation_models

@jensleitloff
Copy link

Try to add

import os
os.environ['SM_FRAMEWORK'] = 'tf.keras'

before importing keras and segmentation_models.

@vijay-jaisankar
Copy link

Adding on to @jensleitloff 's answer, this answer on StackOverflow provides some more alternate approaches.

The accepted answer worked for me on a local machine and the answer in this thread worked for Kaggle/Colab.

@sohailjamal
Copy link

this answer helped alot

@idhamari
Copy link

this may help #582

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

5 participants