学习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
学习TensorFlow,邂逅MNIST数据集的更多相关文章
- 一个简单的TensorFlow可视化MNIST数据集识别程序
下面是TensorFlow可视化MNIST数据集识别程序,可视化内容是,TensorFlow计算图,表(loss, 直方图, 标准差(stddev)) # -*- coding: utf-8 -*- ...
- 深度学习原理与框架-Tensorflow基本操作-mnist数据集的逻辑回归 1.tf.matmul(点乘操作) 2.tf.equal(对应位置是否相等) 3.tf.cast(将布尔类型转换为数值类型) 4.tf.argmax(返回最大值的索引) 5.tf.nn.softmax(计算softmax概率值) 6.tf.train.GradientDescentOptimizer(损失值梯度下降器)
1. tf.matmul(X, w) # 进行点乘操作 参数说明:X,w都表示输入的数据, 2.tf.equal(x, y) # 比较两个数据对应位置的数是否相等,返回值为True,或者False 参 ...
- tensorflow学习笔记————分类MNIST数据集
在使用tensorflow分类MNIST数据集中,最容易遇到的问题是下载MNIST样本的问题. 一般是通过使用tensorflow内置的函数进行下载和加载, from tensorflow.examp ...
- TensorFlow 训练MNIST数据集(2)—— 多层神经网络
在我的上一篇随笔中,采用了单层神经网络来对MNIST进行训练,在测试集中只有约90%的正确率.这次换一种神经网络(多层神经网络)来进行训练和测试. 1.获取MNIST数据 MNIST数据集只要一行代码 ...
- TensorFlow训练MNIST数据集(1) —— softmax 单层神经网络
1.MNIST数据集简介 首先通过下面两行代码获取到TensorFlow内置的MNIST数据集: from tensorflow.examples.tutorials.mnist import inp ...
- 基于 tensorflow 的 mnist 数据集预测
1. tensorflow 基本使用方法 2. mnist 数据集简介与预处理 3. 聚类算法模型 4. 使用卷积神经网络进行特征生成 5. 训练网络模型生成结果 how to install ten ...
- TensorFlow 下 mnist 数据集的操作及可视化
from tensorflow.examples.tutorials.mnist import input_data 首先需要连网下载数据集: mnsit = input_data.read_data ...
- 《Hands-On Machine Learning with Scikit-Learn&TensorFlow》mnist数据集错误及解决方案
最近在看这本书看到Chapter 3.Classification,是关于mnist数据集的分类,里面有个代码是 from sklearn.datasets import fetch_mldata m ...
- Tensorflow基础-mnist数据集
MNIST数据集,每张图片包含28*28个像素,把一个数组展开成向量,长度为28*28=784,故数据集中mnist.train.images是一个形状为[60000,784]的张量,第一个维度数字用 ...
随机推荐
- application-config.xml和mvc-config.xml的区别
头一个放bean之类的东西 后一个放controllers, view resolvers之类的东西
- Gradle--初识
1.Eclipse从svn导入Gradle项目 1.检出项目的时候不要选新项目,选"做为工作空间中的项目检出",然后点Finish. 2.将项目转为Gradle项目,右键导入的项目 ...
- 使用linux部署tomcat项目
1.下载对应的Tomcat服务器包 Apache Tomcat官网下载: http://tomcat.apache.org/download-70.cgi 比如我们使用的是 apache-tomca ...
- 解决问题redis问题:ERR Client sent AUTH, but no password is set
是的,这又是一个坑爹的问题. 明明在redis.conf中设置了密码,而且redis还启动了,为什么说没有密码呢? 大家都知道linux下启动redis有很多种方法, 其中有 ./redis-serv ...
- POJ 2135 最小费用最大流
题目链接 Farm Tour Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18961 Accepted: 7326 D ...
- Numpy函数学习--genfromtxt函数
genfromtxt函数 今天学习时遇到了genfromtxt函数 world_alcohol = numpy.genfromtxt("world_alcohol.txt",del ...
- Hibernate异常之命名查询节点未找到
异常信息: java.lang.IllegalArgumentException: No query defined for that name [salaryEmps] at org.hiberna ...
- try_files 居然有这种用法
try_files 参考:https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ Use the tr ...
- Programming In Scala笔记-第六章、函数式对象
这一章主要是以定义和完善一个有理数类Rational为线索,分析和介绍有关类定义,构造函数,方法重写,变量定义和私有化,以及对操作符的定义等. 一.Rational类定义和构造函数 1.定义一个空类 ...
- Activtiy完全解析(三、View的显示过程measure、layout、draw)
转载请标明出处: http://blog.csdn.net/xmxkf/article/details/52840065 本文出自:[openXu的博客] 在Activity完全解析的第一篇文章A ...