Load that &%$*# Checkpoint!

The checkpoint save should be done before you load your checkpoint in the lab.Make sure you know where your checkpoint is saved so that you can upload that file to the Udacity workspace!Working in Colab?If you’re working in Google Colab and have your Google Drive mounted to your notebook (here’s a great article you can check out if you’re just getting started with Colab and don’t know what I’m talking about), you can move your checkpoint directly into your Google Drive by running:model_save_name = 'classifier.pth'path = F"/content/gdrive/My Drive/{model_save_name}" torch.save(model.state_dict(), path)Just make sure you have that file path correct!*If you decide to save your checkpoint to your Google Drive, you can actually move it from there to Udacity’s workspace by going to your Google Drive, getting the shareable link file, and finding your file ID..You only want the file ID: it will be the long string of letters and numbers after “id=”..Then go to the Udacity lab notebook and run!pip install gdown==3.6.0To install gdown..Then runckpt_file_id = "YOUR-FILE-ID-GOES-HERE"(make sure to replace “YOUR-FILE-ID-GOES-HERE” with your actual file ID!)and finally!gdown https://drive.google.com/uc?id={ckpt_file_id}. More details

Leave a Reply