How to release or reset the GPU memory in Colaboratory notebook
Google has announced that it will provide the GPU enabled Colaboratory notebook for free to anyone to use. You can use K80 GPU for free up to 12 hours, which might not be long enough for large neural network training, but, at the same time, is long enough for training and educational purpose. However, it is easy to mess up the Colab environment, and you'll end up with your GPU memory full, and won't be able to produce any variables or computational graphs on GPU. I googled to resolve this situation, but couldn't find any proper solution. I've tried following steps, and it worked. You can easily follow the nest steps and you will have your GPU memory back. Good luck! Note: "!" mark enables to commit terminal commands, such as nvidia-smi, ps, and top. GPU status when GPU memory is full !/opt/bin/nvidia-smi Wed Jun 20 08:04:20 2018 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 384.111