top of page

What is Google colab

Updated: Dec 20, 2021




In this blog we will discuss colab, what is it and how to use it? Let's start.


What is google colab?


Google colab is a free online notebook with some features, which provides an environment like jupyter notebook for python programming language - Provided by Google include GPU and TPU support as well . You can build any machine learning models using python or pyspark both and perform data analysis.


In google colaboratory there are many machine learning libraries pre installed and it offers GPU usage. It is mainly used by machine learning engineers and data scientists.


Google colab is available in three different versions: google colab, google colab pro and google colab pro plus.


Google colab


It is free to use and can access all its features to a certain extent. In the free version of google colaboratory, it provides the 12 GB RAM and 78 GB memory. if you need to extend it then you can go with google colab pro or google colab pro plus.


Google colab pro


Google colab provides a subscription plan called google colab pro, in that it provides advanced features. You can access this plan for $9.99 per month. In this plan google colab provides the following features. For now it is available only United states, Canada, Japan, Brazil, Germany, India, France, United Kingdom and Thailand.

  • Faster GPUs

Access to faster GPUs and TPUs means you spend less time waiting while your code is running.

  • More memory

More RAM and more disk means more room for your data.

  • Longer runtimes

Longer running notebooks and fewer idle timeouts mean you disconnect less often.


Google colab pro plus


Third plan of Google colab is called google colab pro plus, In that it provides more advanced features compared to google colab pro. You can access this plan for $49.99 per month. In this plan google colab provides the following features


  • Background execution

Notebooks keep working even after you close your browser.

  • Faster GPUs

Priority access to faster GPUs and TPUs means you spend less time waiting while your code is running.

  • Even more memory

Significantly more memory than ever before.

  • Even longer runtimes

Gives you the longest running notebooks in Colab so you are able to get your work done.

Why Google Colab?

  • Google colab is free

  • Google colab allow you to access GPU's and TPU's

  • Easy to start with google colab.

  • you can write and execute the python code

  • You can easily create/upload/share the notebook.

  • You can import external data for ex- kaggle.

  • You can easily integrate Keras, PyTorch, OpenCV, TensorFlow, OpenCV etc.


Getting started with google colab


Getting started with google colaboratory is very easy. You do not need to install python or any other prerequisite in your local system.


To use the google colab, You need a browser where you can sign in with google account and will get the environment like jupyter notebook. First you have to sign in with a google account and open a google drive.


Create a New notebook


Home screen of google colaboratory after Sign in with google colab. You can create a new notebook,By clicking on the “New Notebook”. Or you can also create a New notebook, goto the file menu select the "new notebook"

  • You can view the recent notebook you have created.

  • You can upload the local notebook on the drive.

  • You can clone the notebook from the git repository.



Now here Write a simple program print "Hello World!" and execute the cell. You can change the notebook name by double clicking on the file name on top of the corner as shown in the given screenshot. When you move the cursor to the cell, you will see the play button as shown in the below screenshot. when you click on it the code will execute from the cell and output will appear on the below to the cell.



When you move the cursor below the, you will get the option to Add a cell or text in the notebook.


Save notebook


To save the notebook goto the file menu and select "Save" or press the button "Ctrl +s".



Changing runtime type


By Default the GPU and TPU are disable for the notebook. You can easily enable GPU and TPU. by following the steps below.



Mounting Google drive


You can mount google drive using the following code. Or just click on the Mount drive icon as shown in the below. After that one dialogue box will appear on screen to permit this notebook to access your google drive files. When you click on the “connected to google drive” mount successfully.



Code :

from google.colab import drive
drive.mount('/content/drive')


Install Libraries


You can install libraries, dependencies on colab using the "!pip install 'library_name'. for ex- !pip install pyspark. We can install any library using this command , which is not preinstalled in the google colab.


If you need implementation for any of the topics mentioned above or assignment help on any of its variants, feel free to contact us.




Comments


bottom of page