tensorflow mnist测试
简介 mnist相当于ML和DL的 hello world 程序,通过对手写数字的图片进行训练,并对测试图片进行测试,验证其有效性 数据集的准备 有时候直接在代码中下载可能需要一些时间,或者提示 IO error 。因此在实际的使用过程中,会先下载好离线的数据 下载地址相关链接 http://www.tensorfly.cn/tfdoc/tutorials/mnist_download.html https://github.com/HIPS/hypergrad/tree/master/data/mnist 基本的ML方法 参考链接 https://www.tensorflow.org/versions/r0.10/tutorials/mnist/beginners/ 通过下载 https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/mnist/mnist_softmax.py 中的 mnist_softmax.py ,在本地,激活 tensorflow 环境之后,直接运行即可。 注意:上面的代码中,需要指定刚才下载的数据集所在的目录,需要自己修改一下,也可以通过参数传递进去,如 python mnist_softmax.py --data_dir=~/MNIST_data