How to use Colab
What is Colab?
-
Colaboratory is a Google research project created to help disseminate machine learning education and research. It’s a Jupyter notebook environment that requires no setup to use and runs entirely in the cloud. (from Google Colab Notebooks page)
-
It allows you to use free Tesla K80 GPU it also gives you a total of 12GB of RAM, and you can use it up to 12 hours in row (You need to restart the session after 12 hours).
Steps to use Colab
1. Go to Colab webpage
https://colab.research.google.com
2. Upload your .ipynb file
First, go to File -> Upload notebook
And then select Upload -> Choose File to upload the .ipynb file.
3. Connect to hosted runtime
Connect to hosted runtime by clicking the ‘Connect’ button.
4. Use GPU as an accelerator
Enable GPU setting by Edit -> Notebook Settings
Then, select GPU in Hardware accelerator tab.
5. Execute the code one by one
Select each code box -> Click the ▶ button in each left top corner to run.
When you select any other code segments, then you should be able to see a number in [ ] area. If there is no number within [ ], then you need to re-run that segment.
6. Work on the assignment
All the codes that you need to implement will be wrapped by a comment. Implement your own there. Please DO NOT COPY OTHERS.
Work through the notebook, executing cells and writing code in *.ipynb,
as indicated.
You can save your work in Google Drive (click “File” -> “Save”) and resume later if you don’t want to complete it all at once.
While working on the assignment, keep the following in mind:
- The notebook have clearly marked blocks where you are expected to write code. Do not write or modify any code outside of these blocks.
- Do not add or delete cells from the notebook. You may add new cells to perform scratch computations, but you should delete them before submitting your work.
- Run all cells, and do not clear out the outputs, before submitting. You will only get credit for code that has been run.
You can upload files on Colab by using the file upload option that you can find on the top-left corner as shown below.
7. Download the .ipynb
Once you finish implementing all the codes, please download your .ipynb file. Please submit your .ipynb file with the outputs (Please DO NOT clear the outputs).
8. Zip every .ipynb files to uniqueid_umid.zip and submit your .zip file to Canvas
- Please zip all .ipynb files to uniqueid.zip. (e.g.
justincj.zip
) - Please DO NOT change each filename.