Skip to content

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. 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.

-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%
```

Clone this wiki locally