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
22.45k stars 4.19k forks source link

PyTorch Colab of Chapter 13.5 is having an IndexError #2562

Closed gab-chen closed 6 months ago

gab-chen commented 8 months ago

Chapter 13.5 Training on Multiple GPUs 13.5.5. Distributing Data IndexError: list index out of range image

gab-chen commented 8 months ago

@AnirudhDagar Can you take a look when available? Found that you adapted the code to PyTorch.

AnirudhDagar commented 8 months ago

Hi @gab-chen, on google colab, you can only use one GPU, that is the limit from Google. This section of the book will probably fail on colab until they add multi gpu support. You can try to test the code in an environment where you have multiple gpus, and should be just fine.