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

Proper way to make it work on Google Colab #69

Open
DanielMoreiraPinto opened this issue Jun 29, 2021 · 3 comments
Open

Proper way to make it work on Google Colab #69

DanielMoreiraPinto opened this issue Jun 29, 2021 · 3 comments

Comments

@DanielMoreiraPinto
Copy link

I'm trying to use ResNet18's weights in Google Colab, but the imports never match, every time it complains about a different module. I've been trying all version combinations of Keras, Tensorflow and related that I can find on the discussions, but none have worked so far. So I'll ask here directly for ways people have made this work on Colab.

@ayhmdalila
Copy link

Same here, if someone got it to work let me know

@DanielMoreiraPinto
Copy link
Author

Same here, if someone got it to work let me know

Ah I finally got it working by installing by
!pip install git+https://github.com/qubvel/classification_models.git

Then importing as
from classification_models.tfkeras import Classifiers

And only using Tensorflow's modules, ex:
Using from tensorflow.keras.models import Model, load_model, Sequential instead of from keras.models import Model, load_model, Sequential

@ayhmdalila
Copy link

Let me add you can try importing models from tfhub instead if it doesn't work for you

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