Colab

YingTing 2018/03/30
Train Machine Learning Models on Google's GPUs for Free

Training model is the most time consuming and expensive part of machine learning. Training model on a GPU can speed up close to 40 times, taking 2 days and turning model into a few hours.

Colab is aimed at being an education and research tool for collaborating on machine learning projects. Colab is completely free forever.

Logging an google account can acess to Colab application.

Colab provide k80 GPU for unlimited accesses of continuous 12 hours.

In other words, you just get disconnected after 12 hours.


Fig.1 Flowchart of using Colab

Fig.1 shows the flowchart of using Colab.

First step to use Colab is going to Google Colab, sign into google account.Fig.2 The homepage of Colab.

Fig.2 shows the Colab homepage. Press "Sign in" button on the top-right, and login with google account.

To execute Python program, create a new notebook file by pressing "New Python 2 notebook" or "New Python 3 notebook", or upload a notebook file by pressing "Upload notebook...". Fig.3 Create or upload a notebook file in Colab

Fig.3 shows how to create a new python notebook by "New Python 2 notebook" or "New Python 3 notebook", or upload another notebook by "Upload notebook".

To set GPU accelerator, choose Runtime > Change runtime type :Fig.4 Set GPU accelerator by choosing "Runtime" > "Change runtime type"

Fig.4 shows setting GPU accelerator by choosing "Runtime" > "Change runtime type"

Then change the "Hardware accelerator" from "None" to "GPU".Fig.5 Set hardware accelerator using GPU.

Fig.5 shows changing the hardware accelerator from "None" to "GPU" in notebook settings.

Now the notebook settings in Colab is done.

If some models or other files need to be downloaded via the browser, use python library that Colab provide:

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

"PATH/TO/FILE" means the website link of the model or the file.


Ref.

[0] main content

https://hackernoon.com/train-your-machine-learning-models-on-googles-gpus-for-free-forever-a41bd309d6ad

results matching ""

    No results matching ""