python – notMNIST不能在TensorFlow Udacity课程中下载

我正在做Udacity TensorFlow课程,第一次练习:https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/udacity/1_notmnist.ipynb

OSX 10.11(El Capitan)
Python 2.7
virtualenv安装TF

我收到一个错误

“例外:verifynotMNIST_large.tar.gz失败.你能用浏览器搞定吗?”

它找到了“小”文件,但不是“大”文件.感谢帮助.谢谢.

这是整个代码块:

>>> url = 'http://yaroslavvb.com/upload/notMNIST/'
>>> 
>>> def maybe_download(filename, expected_bytes):
...   """Download a file if not present, and make sure it's the right size."""
...   if not os.path.exists(filename):
...     filename, _ = urlretrieve(url + filename, filename)
...   statinfo = os.stat(filename)
...   if statinfo.st_size == expected_bytes:
...     print('Found and verified', filename)
...   else:
...     raise Exception(
...       'Failed to verify' + filename + '. Can you get to it with a browser?')
...   return filename
... 

这是返回的内容

 >>> train_filename = maybe_download('notMNIST_large.tar.gz', 247336696)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 10, in maybe_download
Exception: Failed to verifynotMNIST_large.tar.gz. Can you get to it with a browser?
>>> test_filename = maybe_download('notMNIST_small.tar.gz', 8458043)
Found and verified notMNIST_small.tar.gz

解决方法:

也面临同样的情况.

处理它并继续这是一件简单的事情.

There’s a size mismatch.

Just re-run the code with force=True, and
it works right Now!

如果您尝试手动下载它也将是好的.

如本主题所述:https://github.com/tensorflow/tensorflow/issues/1475

希望能帮助到你.

相关文章

MNIST数据集可以说是深度学习的入门,但是使用模型预测单张M...
1、新建tensorflow环境(1)打开anacondaprompt,输入命令行...
这篇文章主要介绍“张量tensor是什么”,在日常操作中,相信...
tensorflow中model.fit()用法model.fit()方法用于执行训练过...
https://blog.csdn.net/To_be_little/article/details/12443...
根据身高推测体重const$=require('jquery');const...