Model loading from Colab

Hi it’s a small problem I am facing with respect to model saving and loading.
I am training a simple classification model in Google Colab. As per the instructions from
I am saving the model as,"/folder/")

After this, I am downloading the saved file from colab. While trying to load it(ONLY FOR INFERENCE)in my local machine as

model = NetClass()

It does not load the model but returns an error as

RuntimeError: ./mymodel/ is a zip archive (did you mean to use torch.jit.load()?)

I tried unzipping the downloaded file manually and it has a directory structure which is expected. Now I don’t know where to proceed.

I tried the same method in the same colab file itself and IT WORKED. But in local file it is NOT WORKING
Any kind of help and suggestions would be highly appreciated!
Thank you!

1 Like

Are you using different PyTorch versions in Colab and on your local machine?
If so, I guess your local installation might be older so could you update it?

1 Like