d2l-ai / d2l-en

Interactive deep learning book with multi-framework code, math, and discussions. Adopted at 500 universities from 70 countries including Stanford, MIT, Harvard, and Cambridge.
https://D2L.ai
Other
23.24k stars 4.27k forks source link

image_augmentation pytorch colab (sec 13.1) does not work #1718

Open murphyk opened 3 years ago

murphyk commented 3 years ago

This colab fails because of the line

img = d2l.Image.open('../img/cat1.jpg')

I think you need to use something like this:

url = 'https://github.com/d2l-ai/d2l-en/blob/master/img/cat1.jpg?raw=true'
fname = 'cat1.jpg'
!wget $url -q -O $fname
img = d2l.Image.open(fname)

In addition, the multi-GPU code won't work in colab.

astonzhang commented 3 years ago

Thanks. For now colab only supports single-GPU execution of notebooks.

AnirudhDagar commented 3 years ago

Hi, this issue is not specific to PyTorch and is probably a feature we should add to d2lbook. Anyways I'll send a quick fix for now.