avatarAvinash

Summary

The website content provides instructions for installing the PyTorch v1.0 nightly build on Google Colab to access new features for Deep Learning with Python, as detailed in Udacity's Lesson 9, and offers a link to an updated stable version since its release.

Abstract

The provided content outlines a process for users to set up a Google Colab Notebook with the latest PyTorch v1.0 nightly build, which is necessary for completing Lesson 9 of Udacity's Deep Learning with Python course. It includes a script to automatically download the appropriate PyTorch version based on the GPU architecture available in Google Colab. The author has also provided a direct link to a modified notebook for easy upload and use. Additionally, the author has updated the instructions to include a link to a new notebook using the stable version of PyTorch v1.0, which became available after the initial post. The content encourages users to reach out for assistance if they encounter issues with the notebook.

Opinions

  • The author values the importance of using the latest software versions for deep learning education, as evidenced by their efforts to provide a notebook with the nightly build of PyTorch v1.0.
  • The author is committed to maintaining the usefulness of their content, as shown by their update to include a link to the stable version of PyTorch v1.0 after its release.
  • The author is open to providing support and assistance, inviting users to message them on Slack if they face any issues with the provided notebook.
  • The author's enthusiasm for the subject is conveyed by their sign-off, wishing users the best for the last lesson, indicating a supportive and encouraging stance towards learners.

Google Colab Notebook with PyTorch v1.0 Nightly (Lesson 9)

UPDATE 8th Dec, 2018: Since now PyTorch stable is available, I have updated and released a new notebook with stable version. I am keeping this blog post as it is for historical reasons. You can you get the updated version from here — https://readmedium.com/google-colab-notebook-with-pytorch-v1-0-stable-lesson-9-46433881da05

In Lesson 9 of Udacity’s Deep Learning with Python, we explore the latest features of PyTorch. We use beta/nightly version of PyTorch, which is not available on stable release channel. So, to get the appropriate version working on Google Colab, I made this handy notebook, which installs correct PyTorch version based on the GPU architecture of Google Colab.

Here are the brief steps:

  1. Download the modified Notebook from this link
  2. Visit Google Colab
  3. You will be prompted with a modal, select Upload
  4. If modal doesn’t appear and instead if it opens a new Notebook, then from menu File > Upload Notebook
  5. Upload the modified notebook
  6. That’s it!

If you are curious to know what I did, then I wrote this following script which downloads PyTorch v1 nightly:

from os.path import exists
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
cuda_output = !ldconfig -p|grep cudart.so|sed -e 's/.*\.\([0-9]*\)\.\([0-9]*\)$/cu\1\2/'
accelerator = cuda_output[0] if exists('/dev/nvidia0') else 'cpu'
!pip install torchvision_nightly
!pip install torch_nightly -f https://download.pytorch.org/whl/nightly/{accelerator}/torch_nightly.html

Hope this helps! If you have got any issues with running this notebook, then feel free to message me on Slack for any help. My slack username is avinash

All the best for the last lesson!

Deep Learning
Pytorch
Udacity
Pytorchudacityscholar
Google Colab
Recommended from ReadMedium