dataset = load_dataset("fashion_mnist")
Loading the datasets from the datasets given by HuggingFace always throws a connection error exception to me: I wrote this blog in anger.
ConnectionError(f"Couldn't reach https://raw.githubusercontent.com")
At first I thought it was a problem with Scientific Internet, but I changed/restarted it and still couldn’t access it. Later, I took a closer look and found that the requested address was: GitHub - zalandoresearch/fashion-mnist: A MNIST-like fashion product database. Benchmark A MNIST-like fashion product database. Benchmark :point_down: - GitHub - zalandoresearch/fashion-mnist: A MNIST-like fashion product database. Benchmark https://github.com/zalandoresearch/fashion-mnist
Direct access to this product is OK, but it will hang when spliced into a URL for downloading. The solution is to change the file address:
C:\Users\xxx\.cache\huggingface\modules\datasets_modules\datasets\fashion_mnist\0a671f063342996f19779d38c0ab4abef9c64f757b35af8134b331c294d7ba48\fashion_mnist.py
Find the file fashion_mnist.py from the path above , comment out the original _URL and change it to the highlighted address.