-
Notifications
You must be signed in to change notification settings - Fork 44
mnist convolutional example
Tobias Kind edited this page Nov 21, 2015
·
30 revisions
The mnist/convolutional.py example is directly taken from the tensorflow/models/image example folder. It will train a neural net based on the NIST handwriting data set. More specifically a LeNet-5 like convolutional neural network. The Google TensorFlow tutorials contain beginners and expert code for better understanding of the machinery behind.
After the installation or download of the tensorflow repository a new subdirectory with the name data will be created. This is were four files will be installed. The data is taken from http://yann.lecun.com/exdb/mnist/ which also nicely explains the details behind this data set.
-rw-r--r-- 1 vm vm 1648877 Nov 20 18:59 t10k-images-idx3-ubyte.gz
-rw-r--r-- 1 vm vm 4542 Nov 20 18:59 t10k-labels-idx1-ubyte.gz
-rw-r--r-- 1 vm vm 9912422 Nov 20 18:59 train-images-idx3-ubyte.gz
-rw-r--r-- 1 vm vm 28881 Nov 20 18:59 train-labels-idx1-ubyte.gz
Then we can change to the tensorflow directory and call
python tensorflow/models/image/mnist/convolutional.py
vm@ubuntu:~/tensorflow$python tensorflow/models/image/mnist/convolutional.py
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelism threads: 8
I tensorflow/core/common_runtime/local_session.cc:45] Local session inter op parallelism threads: 8
Initialized!
Epoch 0.00
Minibatch loss: 12.054, learning rate: 0.010000
Minibatch error: 90.6%
Validation error: 84.6%
```
----
**Links**
[MNIST data set](http://yann.lecun.com/exdb/mnist/) - THE MNIST DATABASE of handwritten digits
[LeNet 5 NN](http://yann.lecun.com/exdb/lenet/) - Short explanation of a LeNet 5 neural network
[convolutional.py](https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow/models/image/mnist/convolutional.py) - The above discussed example hosted at Google Git
[MNIST For ML Beginners ](http://tensorflow.org/tutorials/mnist/beginners/index.md) - Introduction to the MNIST hand writing problem
[Deep MNIST for Experts ](http://tensorflow.org/tutorials/mnist/pros/index.md) - TensorFlow tutorial for the MNIST expert
- tensorflow Home
- tensorflow Overview
- tensorflow Setup
- tensorflow MNIST example
- tensorflow Cifar10 example
- tensorflow AlexNet example
- tensorflow Word2vec example
- tensorflow General examples
- tensorflow Benchmarks
- tensorflow TensorBoard
- tensorflow Data-scientists
- tensorflow Links & Blogs