Colab & CocaCola = Heaven

Cyber_Noob
4 min readMay 8, 2020

--

Hello my fellow ML Noobs out there hungrily searching for an alternative to help yourself out from the ever inevitable crisis, “Limited Hardware Resources”.

Have you ever felt the frustration of tweaking your code thousands of time to fit your memory and waiting for hours just to come to the realization that it was not enough and your RAM crashed….lol.

Or you write your ML code and during compilation you get an error saying that “bla bla bla is missing or couldn’t find the package”.

Well if you have faced these scenarios in the past and you want a change, you are in the right place my friend, come, let me introduce you to an alternative reality where most of these stuffs never happen.

As a beginner I was also one of the member in the Jupyter Notebook cult which is nothing but an awesome editor and I don’t blame it but the problem is that even my 16GB RAM accelerated with 4GB Graphic card were not enough once Igot out of my shell trying to solve some world class problems. Either sometimes we face the missing package problem or its just out limited hardware resources. So what do we do about it…? Aaah enough of just talking and let me introduce you to a new world of possibilities my friend. Let me introduce you to…..

“GOOGLE COLAB”

WHAT’S SO SPECIAL ABOUT THIS GOOGLE COLAB?

Well if I have to put together in Tony Stark’s style,

  • Zero configuration
  • Free GPUs and TPUs
  • Easy sharing

Isn’t it awesome to use all the ML and AI packages you want without an installation in your local system? Well Google Colab does that for you. It has thousands of ML packages pre-installed in its environment so that users don’t need to go hunt for some package in the middle of a compilation.

But hey its not only that. You have an almost similar layout to that of a Jupyter Notebook so I assure you that you won’t feel like a lost child. Almost all the shortcut keys that you use are same to same to that of Jupyter.

It is so much flexible that you can either connect it to your system and run stuffs on your Local System or connect to their servers and run your program on their server itself.

As you can see in the above screenshot you will be initially provided provided with a 12GB RAM environment but hey don’t worry, you get an optional 35GB RAM if you are capable of crashing their currently provided 12GB RAM and let me tell you that it’s damn simple than you would imagine and all it needs is a 2 line code or simply put psst…”An infinite loop”. If you want to know the exact code feel free to contact me and I would love to help you out personally or write another article about it

Moving on if you look at the top left corner of your work space you could see an option called “Mount Drive” which will come really handy when you don’t want to have to ML related projects and datasets on your local hard disk itself.

And yea you have the right to choose what type of runtime type you want to connect to which is nothing but choosing whether you require GPU or TPU accelerations or just RAM is enough.

You can grab those settings by going to Runtime → change runtime type.

And that’s it for today folks, I hope you guys learnt something new today and you liked it. If you have any doubts do hit me up via responses or inbox and your criticisms are warmly welcome, see you next time with a more interesting post. This is cyber_noob signing off and an official bye to my fellow noobs.

--

--

Cyber_Noob

I am a tech enthusiast always up for the challenge. I am currently doing Fourth year of my Bachelor's degree. A market enthusiast and part time Trader/Investor.