wlmnzf / tensorflow-train Goto Github PK
View Code? Open in Web Editor NEWA demo modified from tensorflow 0.7 documents for study
A demo modified from tensorflow 0.7 documents for study
本github是个人学习tensorflow时对官方代码进行修改的demo ======== MNIST手写字识别 目录 /mnist /minist/data和/mnist/Mnist_data是官方的mnist数据库,原本还想把解析出来的图片放进去,奈何太多了,几万张,git卡死,只好作罢。 我修改的主要是mnist_softmax.py,新增一个mnist_demo.py(将图片转为标准的矩阵) /mnist/test_num中存放待预测的图片,比如目前可以放28*28的灰度图或者rgb图,图片的命名格式为 标准数字_序号。
如题,图片已经处理成28*28了,放到test_num文件夹下,接着怎么计算呢。谢谢
已经用pip install image,但是运行代码mnist_demo.py依然提示“ImportError: No module named Image”错误 , 查看mnist_demo.py代码里直接写的import Image 就会报错, 改成from PIL import Image 就不报错误了, 不知道大家在用的时候有没有遇到这个问题, 如何才能不用from PIL 而不报错呢?
input: 9
Traceback (most recent call last):
File "mnist_softmax.py", line 69, in
print("output:",int(res[0]))
IndexError: invalid index to scalar variable.
raise ArgumentError(action, message % conflict_string)
ArgumentError: argument --learning_rate: conflicting option string: --learning_rate
Hello,every,could you tell me how to download the project? Thank you very much.
代码如下
Traceback (most recent call last): File "mnist_softmax.py", line 40, in <module> mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True) File "/home/liushiyao/tensorflow-train/mnist/input_data.py", line 201, in read_data_sets local_file = maybe_download(TRAIN_IMAGES, train_dir) File "/home/liushiyao/tensorflow-train/mnist/input_data.py", line 38, in maybe_download if not tf.gfile.Exists(work_directory): AttributeError: 'module' object has no attribute 'gfile'
小白发问:
从/mnist/test_num待测图片生成的矩阵存在哪里呀
怎么从矩阵生成像官网给的Mnist_data数据格式,然后load输入到算法里呢
谢谢各位大牛了
w_conv1 = weight_variable([5, 5, 1, 32])
这里这个shape最后一个为什么是32呢, 这个有没有啥说法,我理解是把一张图片分成32张,每张可能提取到不同的特征。 我把32换成1, 后面的64换成2,也能运行,而且训练速度更快,迭代到最后正确率差不多
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.