我正在keras中下载cifar10数据集:
(X_train, y_train), (X_test, y_test) = cifar10.load_data()
显示以下错误
Untaring file...
Traceback (most recent call last):
File "<ipython-input-2-996c10ccd1de>", line 1, in <module>
(X_train, y_train), (X_test, y_test) = cifar10.load_data()
File "/home/meenu/anaconda3/lib/python3.6/site-packages/keras/datasets/cifar10.py", line 17, in load_data
path = get_file(dirname, origin=origin, untar=True)
File "/home/meenu/anaconda3/lib/python3.6/site-packages/keras/utils/data_utils.py", line 129, in get_file
tfile.extractall(path=datadir)
File "/home/meenu/anaconda3/lib/python3.6/tarfile.py", line 2007, in extractall
numeric_owner=numeric_owner)
File "/home/meenu/anaconda3/lib/python3.6/tarfile.py", line 2049, in extract
numeric_owner=numeric_owner)
File "/home/meenu/anaconda3/lib/python3.6/tarfile.py", line 2119, in _extract_member
self.makefile(tarinfo, targetpath)
File "/home/meenu/anaconda3/lib/python3.6/tarfile.py", line 2168, in makefile
copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
File "/home/meenu/anaconda3/lib/python3.6/tarfile.py", line 248, in copyfileobj
buf = src.read(bufsize)
File "/home/meenu/anaconda3/lib/python3.6/gzip.py", line 276, in read
return self._buffer.read(size)
File "/home/meenu/anaconda3/lib/python3.6/_compression.py", line 68, in readinto
data = self.read(len(byte_view))
File "/home/meenu/anaconda3/lib/python3.6/gzip.py", line 482, in read
raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached
答案 0 :(得分:0)
我重新下载cifar-10数据集,检查其md5sum,然后修复