How to Get started with Google Collab ?

Vineet Kumar Gupta
2 min readJan 12, 2021

--

Google Colab

There has been a point where we want to do try a project of Artificial intelligence or machine learning but we find our current system is somehow incompatible or in sufficient , in such google collab can be a way to proceed .

What is Google Collab?

Colab is a free cloud service based on Jupyter Notebooks for machine learning education and research. It provides a runtime fully configured for deep learning and free-of-charge access to a robust GPU. In simple terms it’s like an online compiler which is very powerful and easy to use . It can be used to run python based codes.

How to get started ?

Step 1) Go to https://colab.research.google.com/ log in with your google Account

Step 2) Click on New Notebook button

A new Jupyter Notebook like interface would open Now here we can perform all actions we perform in normal python ide

Step 3) After writing the code one can run it by pressing the square shaped run button in the right of every line , Output would be just below the code

What makes Google collab from other online compilers is the availability of option to save file and link google drive directly .

To do so simple one have too run this is google collab shell

from google.colab import drivedrive.mount(‘/content/gdrive’)

And click on the link generated to proceed and complete authentication .

After linking is complete one can access and perform all the actions on google drive . Which we do on our local storage .

Google Collab Intelligently choose whether to use CPU or GPU to run programs but we can also manually change it by going to

RUNTIME → CHANGE RUNTIME TYPE → GPU

There is a lot of other aspects and features in google collab which has not been covered in this tutorial kindly refer to google’s official documentation her to learn more .

--

--

Vineet Kumar Gupta
Vineet Kumar Gupta

Written by Vineet Kumar Gupta

Interested in Data Science, IOT & most probably anything related to computer science and engineering. https://www.linkedin.com/in/vineet-kumar-gupta/

No responses yet