Error while loading previously saved model file


I was trying to load previously saved learner in Google Colab(fastai version 1.0.61) which was working fine till a couple of days back.
Now I’m getting the following error.
Thanks in advance.

Retrained the Models and exported it.
It works finr now
Further Doubt

  • Is this some backward complatibility probelm??
  • How can I make sure I need not train the model again down the line?

Hey Sukesh,

Are you using fastai v1 on purpose? That is the old version of fastai and it’s not updated anymore, so it’s better to use the current fastai (v2) if you would like to avoid any issues. Fastai v2 is not backwards-compatible with v1 so if you train a model with v2 you will be able to load it with v2 with no problems.

1 Like

Thank you for your reply.
I haven’t specified the fastai version while installing.
Anyways I’m not installing fastai seperately it’s getting instlled with the fastbook.PFB
So I believe it installed fastai v2 when I created my model in the first place.

Just to make sure the latest version is installed, you may want to print the version of FastAI after installation of the library. This will help confirm you have the right version