You are on page 1of 3

Definition

Google colab Provides a free cloud service based on Jupyter Notebooks that supports free

GPU. Not only is this a great tool for improving your coding skills, but it also allows

absolutely anyone to develop deep learning applications using popular


libraries such as PyTorch, TensorFlow, Keras, and OpenCV.

Colab is a Google internal research tool for data science. They have released the tool sometime earlier to

the general public with a noble goal of dissemination of machine learning education and research.

Colab Pros
 Pre-built with lots of python library
 Quick Start of python learning
 No infra setup required
 No charges for GPU usage
 Can run your code for 24 hrs without interruptions but not more than that
 Your notebooks is saved in google drive only

Colab Cons
 Need to install all specific libraries which does not come with standard python (Need to
repeat this with every session)
 Google Drive is your source and target for Storage, there are other like local (which eats
your bandwidth if dataset is big)
 Google provided the code to connect and use with google drive but that will not work with
lots of other data format
 Google Storage is used with current session, so if you have downloaded some file and
want to use it later, better save it before closing the session.
 Difficult to work with BIGGER datasets as you have to download and store them in Google
drive (15 GB Free space with gmail id, additional required a payment towards google)

How to use google Colab


1. You need to signup and apply for access before you start using google colab.
2. Once you get the access, you can upload notebooks using File->Upload Notebook. I
have uploaded the fastai lesson 1 notebook. And please visit this notebook for reference.
Setup cells will be available in the shared notebook.
3. To enable GPU backend for your notebook. Runtime->Change runtime type->Hardware
Accelerator->GPU.
4. To cross-check whether the GPU is enabled you can run the first cell in the shared
notebook.

Implement a simple code with


Colab and write the result
Import os

If’COLAB_TPU_ADDR’ not in os.environ:

Print(‘not connected to TPU’)

Else:

Print(‘connected to TPU’)

If gpu is connected it will output the


following (connected to tpu )

If it is not connected to tpu it will output


(not connected to tpu)

1-https://towardsdatascience.com/getting-started-with-google-colab-

f2fff97f594c

2https://www.reddit.com/r/learnpython/comments/7wkrnl/google_colab_a_free_gpu_enabled_jupyer_note

book/

3-https://www.kdnuggets.com/2018/02/fast-ai-lesson-1-google-colab-free-

gpu.html
4-https://www.kdnuggets.com/2018/02/google-colab-free-gpu-tutorial-tensorflow-

keras-pytorch.html

5-

https://colab.research.google.com/notebooks/welcome.ipynb#scrollTo=lSrWNr3MuFU

You might also like