How to get rid of underfitting for my model

Hi.

You can save the trained model using learn.save(‘example-model’) and skip retraining it again, like what Jeremy showed in class.

For Colab, it will be saved in your dataset folder, in a folder named ‘models’. It will have a file extension .pth. Download it to your local drive (say desktop) and upload into Colab when you are ready for next round of training (say after you re-initiate Colab).

To let Colab find the saved model, you have to put back the .pth file in ‘models’ folder, which is in your dataset folder. You may need to create folder named ‘models’ and put in under your dataset folder.

To upload file into Colab, use:

from google.colab import files
files.upload()

it will prompt you to upload file. Select the file and upload starts. However, this method is very slow.

Alternatively, upload the .pth file (saved model) to a cloud storage (say Dropbox). Create a share link. Upload the file using:
!wget -O example-model.pth share-link

Then move the file:
!mv example-model.pth dataset/models

Please refer to the Colab platform post for more specific info.

Hope this helps.