Faster Machine Learning Training with a GPU or TPU | by Bruce H. Cottman, Ph.D. | Towards Data Science

You can use the Jupyter Notebook on your local computer. Google Colab improves on the Jupyter Notebook in many ways. Here are the seven most powerful reasons to use Google Colab:
You can get any public Jupyter Notebook from a GitHub repository.You load, edit, and save any .ipynbfile to the Google Drive associated with the Colab login. It is helpful to have a separate Google account for each project and thus a different Google Drive.
You can get any public Jupyter Notebook from a GitHub repository.
You load, edit, and save any .ipynbfile to the Google Drive associated with the Colab login. It is helpful to have a separate Google account for each project and thus a different Google Drive.
Note: You can create a Git account for any project folder on Google Drive. Each team member hosts on a variety of different local computers. All they need is a browser and internet connection. Your team can be fully distributed geographically by the cloud.
3. You can provision one of many generations of the NVIDIA GPU.
4. You can provision one of many generations of the Google TPU.
5. You can provision a multi-core CPU.
6. Google Colab is free. Also, you can upgrade to a premium version that costs $9.99 per month per account.
7. A Colab notebook has many useful extensions of a Jupyter Notebook.
In a browser, head to https://colab.research.google.com. A new tab pointing to Google Colab opens:
If you are new to Colab, the only file in Recent is Welcome to Collaboratory. As I am not new, you can count five files in Recent.
Click on GitHub and observe:
Enter the GitHub account you want to browse. I entered bcottman, my GitHub top-level repository.
From the repo bcottman/paso, I chose the file bcottman/paso/integration_test_pre_all.ipynb.
This results in the file bcottman/paso/integration_test_pre_all.ipynb being loaded into the GCP (Google Cloud Platform) Colab browser.
You can create a Google Drive and then create a Git account for any project folder. You are going to https://colab.research.google.com. Mount the Google Drive of the Google account. All files in the Google Drive will appear when you click on File|Open notebook:
Select the colab_itils.ipynb file:
Click on Runtime|Change runtime type: to provision an Nvidia GPU:
The status of provisioning the Nvidia GPU is checked with:
The from tensorflow.python.client import device_libdevice_lib.list_local_devices()
Output:
[name: "/device:CPU:0"  device_type: "CPU"  memory_limit: 268435456  locality {  }  incarnation: 17311008600223054265, name: "/device:GPU:0"  device_type: "GPU"  memory_limit: 14674281152  locality {    bus_id: 1        links {    }  }  incarnation: 7680686309919727928  physical_device_desc: "device: 0, name: Tesla T4, pci bus id: 0000:00:04.0, compute capability: 7.5"]
An Nvidia Telsa T4 with 14.67 GB of fast memory is provided.
To provision a Google TPU, select TPU in the “Notebook settings”:
In this short article, I showed how:
You can get any public file from a GitHub repository.You can load, edit, and save any .ipynb file to the Google Drive associated with the Colab login.
You can get any public file from a GitHub repository.
You can load, edit, and save any .ipynb file to the Google Drive associated with the Colab login.
3. You can provision one of many generations of the NVIDIA GPU.
4. You can provision one of many generations of the Google TPU.
One critical capability with Google Colab is that team members can collaborate on a project using shared files on GitHub. Also, each team member can create their development sandbox on their own Google Drive.
The cloud empowers remote work. Happy coding!