Primary competition visual

CGIAR Wheat Growth Stage Challenge by CGIAR Platform for Big Data in Agriculture

Helping India
$3 000 USD
Completed (over 5 years ago)
Classification
Computer Vision
563 joined
203 active
Starti
Aug 28, 20
Closei
Oct 04, 20
Reveali
Oct 04, 20
Save Fastai Model to Google Drive and Load Fastai Model from Google Drive
Help · 30 Sep 2020, 03:03 · 4

Have been trying to save a Fastai model to google drive and then load the model from google drive into google colab to make predictions. I can't seem to go about it, would really need your help.

Thank you.

Discussion 4 answers

Let say you save resnet18

So load it firsr create a leraner of fastai

learn = cnnlearner(dls,resnet18,errormetric)

learn.load(path of model from drive)

Note i didn't write exact code

And remove. Pth extension from path above

30 Sep 2020, 03:09
Upvotes 0

Thank you so much!

It's simple, mount the drive first then, when you save, save as learn.save("/content//My Drive/model") and load from same path

30 Sep 2020, 03:59
Upvotes 0

Thank you so much!