When I run deep learning training code on Google Colab, do the resulting weights and biases get saved somewhere?
I am training some deep learning code from this repository on a Google Colab notebook. The training is ongoing and seems like it is going to take a day or two.

I am new to deep learning, but my question:

Once the Google Colab notebook has finished running the training script, does this mean that the resulting weights and biases will be hard written to a model somewhere (in the repository folder that I have on my Google Drive), and therefore I can then run the code on any test data I like at any point in the future? Or, once I close the Google Colab notebook, do I lose the weight and bias information and would have to run the training script again if I wanted to use the neural network?

I realise that this might depend on the details of the script (again, the repository is here), but I thought that there might be a general way that these things work also.

Any help in understanding would be greatly appreciated.

No; Colab comes with no built-in checkpointing; any saving must be done by the user - so unless the repository code does so, it's up to you. 

Note that the repo would need to figure out how to connect to a remote server (or connect to your local device) for data transfer; skimming through its train.py, there's no such thing. 



How to save model? See this SO; for a minimal version - the most common, and a reliable option is to "mount" your Google Drive onto Colab, and point save/load paths to direct

from google.colab import drive
drive.mount('/content/drive') # this should trigger an authentication prompt
%cd '/content/drive/My Drive/'
# alternatively, %cd '/content/drive/My Drive/my_folder/'


Once cd'd into, for example, DL Code in your My Drive (see below), you can simply do model.save("model0.h5"), and this will create model0.h5 in DL Code, containing entire model architecture &amp; its optimizer. For just weights, use model.save_weights().


