Fashion_Mnist垃圾

dataset = load_dataset("fashion_mnist")

从HuggingFace给的datasets中加载数据集,总是给我抛连接错误异常:一气之下写了这篇博客

ConnectionError(f"Couldn't reach https://raw.githubusercontent.com")

开始以为是科学上网的问题,改了/重启了依然无法访问。后来仔细看下,发现请求的地址是:GitHub - zalandoresearch/fashion-mnist: A MNIST-like fashion product database. BenchmarkA MNIST-like fashion product database. Benchmark :point_down: - GitHub - zalandoresearch/fashion-mnist: A MNIST-like fashion product database. Benchmarkhttps://github.com/zalandoresearch/fashion-mnist

这个货直接访问是OK的,但是拼接成网址下载的时候就会挂。解决方案就是把文件地址改一下:

C:\Users\xxx\.cache\huggingface\modules\datasets_modules\datasets\fashion_mnist\0a671f063342996f19779d38c0ab4abef9c64f757b35af8134b331c294d7ba48\fashion_mnist.py

Fashion_Mnist垃圾_第1张图片

从上面路径中找到fashion_mnist.py这个文件,把原来的_URL注释掉改为标亮的地址就OK啦。 

你可能感兴趣的:(python,开发语言)