How do I use the fastai saved model?
I trained my model in google colab, and downloaded the .pkl file in my computer. Now, how do I use it?  How do I load the .pkl file and do I need to install fastai for it to work?


How do I load the .pkl file

Assuming you've saved your model using learner.save you can use complementary learner.load method.

do I need to install fastai for it to work

Yes, you need fastai if you saved it this way. You could also save PyTorch model itself contained inside learner via:
torch.save(learner.model, &quot;/path/to/model.pt&quot;) # or save it's state_dict, better option
model = torch.load(&quot;/path/to/model.pt&quot;)

Either way you need those libraries as pickle stores the data but class definition and creation has to be provided code-wise.
