cifar-10 No such file or directory: '/home/ /.keras/datasets/cifar-10-batches-py/data_batch_1'

使用keras加载cifar-10数据集的时候需要消耗很长时间,而且还不一定能加载成功~~
原因大概是因为数据集有100多兆,down的过程中网络稍不稳定就废了。
解决办法是直接下载:http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
迅雷下载的,很快就完了。
下载下来的文件放到~/.keras/datasets/ 目录下,然后将文件名改名为cifar-10-batches-py.tar.gz
mv ~/Download/cifar-10-python.tar.gz ~/.keras/datasets/cifar-10-batches-py.tar.gz
解压一下:
tar xvfz cifar-10-batches-py.tar.gz
然后再使用
(x_train, y_train), (x_test, y_test) cifar10.load_data()
 
应该就跳过下载的过程,直接加载了。

猜你喜欢

转载自www.cnblogs.com/IAMzhuxiaofeng/p/9142582.html
今日推荐