Google Colab Guide


by Prof. Seungchul Lee
http://iai.postech.ac.kr/
Industrial AI Lab at POSTECH


Table of Contents


1. OverviewĀ¶

InĀ [1]:
%%html
<center><iframe src="https://www.youtube.com/embed/inN8seMm7UI?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
InĀ [2]:
%%html
<center><iframe src="https://www.youtube.com/embed/PitcORQSjNM?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>

2. RequirementĀ¶

  • You might need to have google account for Colab

  • Owing to its remote access, there are no particular computing specifications.

  • Saving the work regularly prevents the kernel from disconnecting on long-time work

3. Connect and Create New NotebookĀ¶


  • You'll be able to create ipynb file by clicking NEW PYTHON 3 NOTEBOOK in the right below at main page
    • Every ipynb file would be saved in GoogleDrvie even if it's not synchronized to it.

4. GPU SettingĀ¶

  • Tesla K80 12GB available for free
  • Available 12 hours in a row and automatically disconnected if there is no response 90 mintues later
    • Not meaning the 12-hour regulation in a day but meaning the 12-hour sequential limitation
  • Select Runtime -> Change runtime type in the left above


  • Click Hardware accelerate, select GPU and save it


5. Mounting Your Google DriveĀ¶

  • Synchronization makes it easier to use the data on GoogleDrive

  • Type the code as above and implement it

InĀ [Ā ]:
from google.colab import auth
auth.authenticate_user()

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


  • Login with user's own google account and allow after clicking the link


  • Copy the code
  • Paste the code to the window and enter it

  • The message as the figure above will be shown if it works nomarlly

  • Please refer to the materials for more information

6. Google Drive PathĀ¶

  • your google drive path: /content/gdrive/My Drive/

  • colab notebook path: /content/gdrive/My Drive/Colab Notebooks

Please refer to the below figure.

InĀ [1]:
%%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')