PyTorch TorchVision Dataset: HTTP Error 503: Service Unavailable

Update: I realized that this problem is caused due to server downtime. Try visiting http://yann.lecun.com/exdb/mnist/ and if it loads, the download should work properly. Alternatively, you can download the dataset from here: https://drive.google.com/file/d/1pvJaFyQvj-nHOeymmJVm3tIlHr9saUZk/view?usp=sharing


When I was trying to download the MNIST dataset using torchvision, it gave me the following error:

HTTP Error 503: Service Unavailable

Here's how I solved it. Disclaimer: This might not work at first attempt but try at least five times (I really don't know what's up with torch, but it worked me so :) 

1. Change the root directory to something else. Re-run the cell on colab (or whatever notebook you're using)

2. Repeat 1 a few times if it doesn't work at first attempt.

Post a Comment

0 Comments