Tensor Flow Machine Learning Page

This web page contains a collection of material provded for people to get started with using Tensor Flow. There are some example scripts provided as a starting point for using this framework in python, along with some slides that walk through the various aspects of using this package, starting with setting up TensorFlow variables and constants, and working up to machine learning examples.

The examples provided use numpy, tensorflow and matplotlib.pyplot python libraries.

Slides / weblinks / references

Versions

TensorFlow version 1.0 was released on Wednesday 15th Feb. The code provided here works with that api version.

Scripts

The table below summarises scripts provided with a brief description of what they are and what you might hope to learn by using and studying the script. Where appropraite dependancies on other scripts are also indicated.
Script Description.
CNN.py (needs input_data.py) Minor adaptation on TensorFlow example for a convolutional neural network. Use MNIST data with a CNN as a deep learning example of hand writing pattern recognition. The purpose of this script is to provide you with an annotated example of setting up and analysing results from a CNN. The accuracy of predictions for the CNN on test, train and validate samples is given at the end of the training process to illustrate generalisation. The training performance converges to an accuracy of 99.2% with 20000 epochs, however a similar level of accuracy is achived much earlier than that.
Examples.py Use TensorFlow to perform basic computations on 2D data.
Fisher.py Use TensorFlow to randomly generate Gaussian distributions of data for two uncorrelated observables and then compute the Fisher discriminant coefficients for these data.
FisherPlots.py As for the Fisher.py example, but plotting the data and output distribution.
Julia.py Draw images based on Julia sets. The purpose of this script is to provide you with an introduction to basic TensorFlow objects, and how you can manipulate a 2D array of data with these.
Mandelbrot.py Draw fractal images based on madelbrot sets. The purpose of this script is to provide you with an introduction to basic TensorFlow objects, and how you can manipulate a 2D array of data with these.
MLP.py (needs input_data.py) Use MNIST data with a multilayer perceptron as an example of hand writing pattern recognition. The purpose of this script is to provide you with an introduction to data loading and performing a more advanced computation with TensorFlow, including hyperparameter optimisation.
Perceptron.py (needs input_data.py) Use MNIST data with a single perceptron with a softmax activation function as an example of hand writing pattern recognition. The purpose of this script is to provide you with an introduction to data loading and performing a more advanced computation with TensorFlow, including hyperparameter optimisation.
PerceptronTB.py (needs input_data.py) Use MNIST data with a single perceptron with a softmax activation function as an example of hand writing pattern recognition. This also writes out data for graph inspection using tensorboard. The purpose of this script is to provide you with an introduction to data loading and performing a more advanced computation with TensorFlow, including hyperparameter optimisation. TensorBoard output is enabled to allow you to inspect the graph corresponding to this model.
PlotMNISTExample.py Script to plot a specified MNIST training example image.
TensorBoard.py TensorBoard is a model visualisation tool. This example script provides you with an example of how to use this for a simple computation (a+b2). Having run the script you can then run tensorboard to obtain a browsable web page on your computer to help understand the data flow graph for this model.

MNIST

The MNIST data used by TensorFlow are images of 28x28 pixels that have been prepared as examples of hand written numbers from 0 through 9. More information can be found at
TensorFlow's MNIST for beginners page and at the MNIST Database Page.


Back to my home-page

Maintained by Adrian Bevan. Last update on Feb-2017