代码报错--------EOFError: Compressed file ended before the end-of-stream marker was reached

背景:运行LeNet识别CIFAR-10的图像的代码时,报错:

    EOFError: Compressed file ended before the end-of-stream marker was reached

解决办法:在C:\Users\华硕\.keras\datasets的目录下面把 cifar-10-batches-py 这个文件夹删掉

原因: 第二次运行时,报错为找不到data_batch_1 这个文件,我的cifar-10-batches-py文件夹里只有data_batch_4文件,所以大致原因是程序中下载的数据集出现丢失或者其他问题,把数据集删掉重新下载可以解决。

posted @ 2019-03-25 18:24  爱喝牛奶的大魔王  阅读(5669)  评论(0编辑  收藏  举报