Introduction

Colaboratory is a tool from Google that lets you run a Python Notebook in the cloud with GPU support. There are some limitations on available memory and time constraints for running a continuous session yet it should be enough to train a decent scale machine learning models. Here is an overview of the setup process together with a sample notebook that shows how to use Colaboratory to start with deep learning on Labeled Faces in the Wild dataset using Keras.

Set-up

The first prerequisite is that you have a Google account and a browser other than Internet Explorer. You probably do, so open your Google Drive. Here, we need to connect the Colaboratory app as shown below.

Then, search for the phrase colaboratory and connect it with your account.

At this point, you should be able to create new Colaboratory Notebook.

To enable GPU support, you need to edit Notebook Settings.

Choose the GPU option from the Hardware accelerator dropdown list and save the setting.

Now, you are ready to do some deep learning.

Deep learning starter notebook

You can start by following a deep learning starter notebook that can be accessed here: DeepLearningStarter.ipynb. It assumes some basic Python programming skills. This notebook is a step by step guide to solve an image classification task. It uses the Labeled Faces in the Wild, “database of face photographs designed for studying the problem of unconstrained face recognition”. It contains images of famous people, e.g. Bill Clinton:

The model employed in this task is an all convolutional neural network implemented in Keras. You should be able to achieve results similar (or even better, after tuning some training hyper-parameters) to the ones shown below.