d2l-en icon indicating copy to clipboard operation
d2l-en copied to clipboard

image_augmentation pytorch colab (sec 13.1) does not work

Open murphyk opened this issue 3 years ago • 2 comments

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.

murphyk avatar Apr 12 '21 04:04 murphyk

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

astonzhang avatar Apr 12 '21 17:04 astonzhang

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.

AnirudhDagar avatar Apr 17 '21 16:04 AnirudhDagar