Make Google Colaboratory GPU session wait for you.

Jainil Parikh
Jun 27, 2021

Have you ever been in a situation where your deep learning model takes hours to run and you forget about it on a tab on your browser? Once the run is complete the Colab notebook stops, without you having the chance to play around with the trained model??

Google Colab

I have a simple yet effective solution to prevent Colab from ending the session.

Insert a Input statement at the end of your program. This ensures that your Colab will run waiting for the input. So whenever you comeback to your Colab notebook your GPU instance will still be running as it is without ending the session!!

Code to prevent Google Colab session from stopping

Enjoy deep learning!

--

--