Buomsoo Kim

Start machine learning with Google Colaboratory!

|

Google Colaboratory (Google Colab)

Google Colab is a free development tool for machine learning research and education. It is based on Jupyter but does not require installation of Jupyter, or even Python on your machine! You just need Google ID to use Google Colab service.

Reasons why you should use Google Colab

To be honest, I was pretty skeptical on using Google Colab for machine learning development when I initially learned about it. Actually, it was almost a year ago and Colab did not have most of great benefits that they are providing now. Such benefits include:

  • Easy As it is based on Jupyter, creating and coding with Colab is basically similar to doing so with Jupyter Notebook. Though you will need to get used to some technicalities, such as uploading a file or connecting to Google Drive, but they will pay off with great convenience shortly after you get familiar.

  • Free It is free to use and you can also use free GPU (NVIDIA Tesla K80) up to 12 consecutive hours! Training deep learning models with Colab is much faster than with my machine (with NVIDIA GTX 1060).

  • Accessible As long as you are connected to Internet and have Google ID, you can virtually use Google Colab anywhere, with any device. As mentioned, you do not need to install Python nor Jupyter, and also

  • Social As the name suggests, Google Colab is suited for collaborating with others. You can create and modify a Colab file with Google Drive, and as the file is automatically saved in your Google Drive, the file can be shared to your friends by sending only the Google Drive link to your file.

Google Colab 101

1. Connect with Colab application

If you are using Colab for the first time, you have to connect to the application. In any folder of your choice, press [NEW] > [More] > [+ Connect more apps]

Then in [Connect apps to Drive] window, search for colaboratory. By pressing [+CONNECT], you will be able to add Colaboratory to your Google Drive apps.

2. Create Colab file

Now, you can create Colab files in the same way you create Google Docs, Sheets, or Forms.

By choosing colaboratry, new Colab file (actually .ipynb file in your Drive) will appear in new window.

3. Code & Enjoy!

Now with a new Colab file, you can start coding without any further ado. As you could see, many data science packages including NumPy, Pandas, and Tensorflow are ready-to-go in any Colab environment.