Appendix B. Using Google Colab
This chapter covers
- How to use Colab Notebooks
Google Colaboratory (https://colab.google/), or Colab for short, is a hosted Jupyter Notebook service that requires no setup and provides free access to computing resources, including GPUs and TPUs. Colab is especially well suited to machine learning, data science, and education.
You can use Colab for free, though there are paid plans with an increased amount of compute units, faster GPUs, more memory, and other features.
A huge collection of curated notebooks is available here: https://colab.google/notebooks/.
A notebook is a list of cells. Cells contain either explanatory text or executable code and its output. You can interactively run cells and observe their outputs.
Figure B.1 A Colab notebook is a collection of cells with code and text.
The Colab basic features are explained in the following notebook: https://colab.research.google.com/notebooks/basic_features_overview.ipynb
Among things especially relevant for our book is the ability to change the runtime between CPU, GPU and TPU. You can do it in the “Runtime” menu:
Figure B.2 the Runtime menu allows changing runtime type.
Depending on your subscription, free or paid, specific options available may differ. In my Colab Pro subscription at the moment of writing this chapter, the following options are available: