Why does colab disconnect?
There could be many possibilities why your session is crashing.

There is a time limit for the free tier in Google Colab. If your execution gets over the time, it disconnects.

Also check the RAM usage, if that exceeds the session will crash.

The storage limits might exceed.


Run and keep an eye on these factors. And try to optimise the code or use aws for training.
I am trying to load my dataset. I have been using colab's TPU for many times,but the colab gets disconnected every time. I have tried all the methods to keep it connected, still it doesn't work. I have been training for more than 10 hours and still the colab gets disconnected. What do I do??