学习TensorFlow,邂逅MNIST数据集

如果说"Hello Word!"是程序员的第一个程序,那么MNIST数据集,毫无疑问是机器学习者第一个训练的数据集,本文将使用Google公布的TensorFLow来学习训练MNIST数据集。

本文结构分为三个部分,一是如何使用TensorFLow来学习训练MNIST数据集,二是运行结果,三是问题小结。

一. TensorFLow来学习训练MNIST

在github上下载数据:https://github.com/tensorflow/tensorflow/tree/master/tensorflow/g3doc/tutorials/mnist

运行代码:

<span style="font-size:14px;">python fully_connected_feed.py</span>

即可。

二. 运行结果


三. 问题小结

1. TensorFlow IOError: [Errno socket error] [Errno 104] Connection reset by peer

解决办法:网络出问题,看看能不能访问http://yann.lecun.com/exdb/mnist/,调节网络配置,翻过防火墙,能够访问后就没有问题了。 这个问题让我纠结了很长时间,一个大牛帮我解决的https://stackoverflow.com/questions/33731875/tensorflow-ioerror-errno-socket-error-errno-104-connection-reset-by-peer


2. ImportError: No module named g3doc.tutorials.mnist


解决办法:修改fully_connected_feed.py中23行代码,如下:

<span style="font-size:14px;">#from tensorflow.g3doc.tutorials.mnist import input_data
#from tensorflow.g3doc.tutorials.mnist import mnist
import input_data
import mnist</span>


有问题请留言,我也在学习中,一起交流讨论~


参考资料:

http://www.tensorflow.org/tutorials/mnist/beginners/index.md

http://www.tensorflow.org/tutorials/mnist/pros/index.md

http://www.tensorflow.org/tutorials/mnist/tf/index.md

https://github.com/tensorflow/tensorflow

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 11
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值