Train Your Machine Learning Models on Google’s GPUs for Free — Forever


Training your model is hands down the most time consuming and expensive part of machine learning. Training your model on a GPU can give you speed gains close to 40x, taking 2 days and turning it into a few hours. However, this normally comes at a cost to your wallet.

The other day I stumbled upon a great tool called Google Colab. I would describe Colab as the google docs equivalent of Jupyter notebooks. Colab is aimed at being an education and research tool for collaborating on machine learning projects. The great part is, that it’s completely free forever.

There is no setup to use it. I didn’t even need to log in. (I was already logged into my google account)

The best part is that you get an unlimited supply of 12 hours of continuous access to a k80 GPU, which is pretty powerful stuff. (You get disconnected after 12 hours, but you can use it as many times as you want)

I want our focus to be training on a GPU and Colab specific so the notebook is extremely bare bones.

The first step is to download the notebook (or another notebook of your choice)

Then, head over to Google Colab, sign into your google account (or create one if you somehow made it this far through life without one)

Choose File > Upload notebook...:

Upload the notebook you downloaded:

Choose Runtime > Change runtime type:

Then choose GPU:

Now you should be able to run your notebooks how you normally would. The only difference is the very last part at the end. If you want to download your model or any other files via the browser, you can use their python library:

from google.colab import files"PATH/TO/FILE")

Final Thoughts

This was a pretty short post, but hopefully it ends the painful days of training your models on your poor little old laptop for days at a time or dropping a ton of 💰 on AWS bills.

Continue at:

The text above is owned by the site above referred.

Here is only a small part of the article, for more please follow the link

Also see:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s