TPU error: RAM full, page stopped responding and slower than GPU on google colab
🐛 Bug

To Reproduce
Steps to reproduce the behavior:

Open lightning_mnist_tpu.ipynb
Run the code

Expected behavior
The code runs normally and faster than GPU.
Error

The webpage stopped responding soon after running the trainer, on several devices such as PC, phone and puffin browser, with Ram reaching 100% on PC. (both GPU and TPU)
Iteration speed for TPU calculations is ~30 it/s while iteration speed for GPU is >90 it/s.

Additional context
Running the demo notebook Lightning-demo.ipynb on TPU solved the first error but the iteration speed is still slower for TPU, with perpare_data added.