终止了 Fashion MNST 下载,现在尝试再次下载时出现错误

我不得不终止 Fashion_MNIST 下载,因为它下载速度非常慢。当我尝试再次下载它时,出现以下错误。我想我需要先删除较早的部分下载。我无法在我的Macbook中找到保存部分下载的文件夹。你能建议我在哪里可以找到 Mac OS 中的部分下载吗?


代码


import tensorflow as tf

from tensorflow import keras


fashion_mnist = keras.datasets.fashion_mnist

(X_train_full, y_train_full), (X_test, y_test) = fashion_mnist.load_data()


错误


Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_core/python/keras/datasets/fashion_mnist.py", line 59, in load_data

    imgpath.read(), np.uint8, offset=16).reshape(len(y_train), 28, 28)

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py", line 276, in read

    return self._buffer.read(size)

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/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


陪伴而非守候
浏览 127回答 1
1回答

SMILET

我认为 tensorflow 正在尝试读取已经下载的数据集,为了再次下载而不是从磁盘读取,您可以从磁盘中删除损坏的文件它们通常位于 ~/.keras/datasets/{name}rm&nbsp;-rf&nbsp;~/.keras/datasets/fashion-mnist/
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python