DEV Community

Mettusella
Mettusella

Posted on

Working With Google Colab

Gone are the days when computing resources were scarce (to run the simplest task takes years). With the advent of sophisticated computing resources, human beings have been able to leverage these tools to solve human problems.

Motivation
Running a machine learning project on a local system can be really daunting and time-consuming; during my undergraduate, I’d to train a facial recognition system to be utilized by a front-end application on a 4Gb RAM, 1.8GHZ CPU computer system which is nothing to write home about.

Here comes Google Colab to the rescue!

What is “Colab”?
Google Colaboratory, or “Colab” for short, is a free cloud service and it also supports free GPU which was developed by Google Research. Colabs allows anyone to write python code(specifically for machine learning and data analysis tasks) through the browser.

How to get started with Colab
1.Creating folder on Google Drive
As a data scientist or machine learning engineer, you will have to work with a folder which could be saved on Google drive. In order to import the folder, we first need to specify the folder we want to work with. For this demo, I created a folder named “Demo” on my Google Drive. You can use a different name that suits you or use the default Colab Notebooks folder.

Alt Text

2.Creating a new Colab Notebook
To create a new notebook, just click on the file, and click on New Notebook.

3.Setting up Free GPU or TPU 
You can use both GPU AND TPU BY
Clicking on the “Runtime” dropdown menu. Select “Change runtime type”. Now select anything(GPU, TPU)that you want in the “Hardware accelerator” dropdown menu.

Alt Text
And that's the end of the short guide to working with Google Colab. Thanks for reading!

Top comments (0)