0% found this document useful (0 votes)
579 views

Google Colab

Google Colab is a free Jupyter notebook environment that runs entirely in the cloud, allowing users to write and execute Python code, load popular machine learning libraries, and share notebooks with team members without any setup required. Colab notebooks can access GPUs for free and be saved to Google Drive. Key features include writing code, documenting with equations, importing datasets from services like Kaggle, and using frameworks like TensorFlow, PyTorch and Keras.

Uploaded by

Ibrahim Isleem
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
579 views

Google Colab

Google Colab is a free Jupyter notebook environment that runs entirely in the cloud, allowing users to write and execute Python code, load popular machine learning libraries, and share notebooks with team members without any setup required. Colab notebooks can access GPUs for free and be saved to Google Drive. Key features include writing code, documenting with equations, importing datasets from services like Kaggle, and using frameworks like TensorFlow, PyTorch and Keras.

Uploaded by

Ibrahim Isleem
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Google Colab

What is Google Colab?


• If you have used Jupyter notebook previously, you would quickly learn
to use Google Colab. To be precise, Colab is a free Jupyter notebook
environment that runs entirely in the cloud. Most importantly, it does
not require a setup and the notebooks that you create can be
simultaneously edited by your team members - just the way you edit
documents in Google Docs. Colab supports many popular machine
learning libraries which can be easily loaded in your notebook.
• Colab is a free notebook environment that runs entirely in the cloud. It
lets you and your team members edit documents, the way you work
with Google Docs. Colab supports many popular machine learning
libraries which can be easily loaded in your notebook.
What Colab Offers You?
As a programmer, you can perform the following using Google Colab.
• Write and execute code in Python
• Document your code that supports mathematical equations
• Create/Upload/Share notebooks
• Import/Save notebooks from/to Google Drive
• Import/Publish notebooks from GitHub
• Import external datasets e.g. from Kaggle
• Integrate PyTorch, TensorFlow, Keras, OpenCV
• Free Cloud service with free GPU
• As Colab implicitly uses Google Drive for storing your notebooks, ensure that you are logged in to
your Google Drive account before proceeding further.

Step 1 − Open the following URL in your browser − https://colab.research.google.com Your browser
would display the following screen (assuming that you are logged into your Google Drive) −
Step 2 − Click on the NEW NOTEBOOK link at the bottom of the screen. A new notebook would open up as
shown in the screen below.

As you might have noticed, the notebook interface is quite similar to the one provided in Jupyter.
There is a code window in which you would enter your Python code.
Setting Notebook Name

By default, the notebook uses the naming convention UntitledXX.ipynb. To rename the notebook,
click on this name and type in the desired name in the edit box as shown here −

We will call this notebook as MyFirstColabNotebook. So type in this name in the edit box and hit
ENTER. The notebook will acquire the name that you have given now.
Entering and Executing Code

You will now enter a trivial Python code in the code window and execute it.
To execute the code, click on the arrow on the left side of the code window.
Adding Code Cells

To add more code to your notebook, select the following menu options −

Insert / Code Cell

Alternatively, just hover the mouse at the bottom center of the Code cell. When the CODE and TEXT buttons
appear, click on the CODE to add a new cell. This is shown in the screenshot below −
Run All

To run the entire code in your notebook without an interruption, execute the following menu options −
Runtime / Reset and run all…
It will give you the output as shown below −
Changing Cell Order
When your notebook contains a large number of code cells, you may come across situations where
you would like to change the order of execution of these cells. You can do so by selecting the cell that
you want to move and clicking the UP CELL or DOWN CELL buttons shown in the following
screenshot −
Deleting Cell

During the development of your project, you may have introduced a few now-unwanted
cells in your notebook. You can remove such cells from your project easily with a single
click. Click on the vertical-dotted icon at the top right corner of your code cell.

You might also like