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

ImportError #1

Open
Johnnytroll opened this issue Sep 22, 2021 · 2 comments
Open

ImportError #1

Johnnytroll opened this issue Sep 22, 2021 · 2 comments

Comments

@Johnnytroll
Copy link

Hi, I work in google colab, try to import segmentation_models_3D as sm, but I get an ImportError: cannot import name 'base' from 'segmentation_models_3D'. I installed keras >= 2.2.0, tensorflow >= 1.13.1, keras_applications >= 1.0.7, classification_models_3D, efficientnet_3D, segmentation_models_3D. What should I do to solve my problem?

@ZFTurbo
Copy link
Owner

ZFTurbo commented Sep 22, 2021

Please try to install the following versions:

tensorflow==2.5.0 and keras==2.4.3

or if you need TF1 then:

tensorflow==1.15.0 and keras==2.3.1

I check it worked on them.

Also on TF2 please add the following line after import:

sm.set_framework('tf.keras')

@Johnnytroll
Copy link
Author

Thanks, it works!

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