Skip to content

alishdipani/MNIST-Tutorial-in-Tensorflow.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

MNIST-Tutorial-in-Tensorflow.js (Live Example)

MNIST tutorial in browser using Tensorflow.js, for a live example click here.
Please run the example in Google Chrome otherwise save model may not work due to a bug in tf.js

Instructions

  1. Load the Dataset.
  2. Visualize a random example.

Creating a Model

  1. Choose kernel size, number of filters, stride and activation function for a convolutional layer and add it.
  2. Choose number of units and activation function for fully connected layer and add it.
  3. Add the Output layer.
  4. Choose batch size and number of epochs for training and train.
  5. Save the Model.(Optional)
  6. Test random example.

Loading a Model

  1. Load the Model JSON(graph) and weights.
  2. Load Model Summary.
  3. Choose batch size and number of epochs for training and train.(Optional)
  4. Save the Model.(Optional)
  5. Test random example.

P.S. -

a) Loading the dataset is necessary.
b) Adding output layer is necessary.
c) Do not close the tensorflow visualization interface which pops up.
d) The training graphs will be plotted in the visor tab.
e) If a Model is Loaded, Loading Model summary is necessary.
f) The Model is saved and loaded in two parts, JSON which stores the model graph and second bin file which stores the weights.
g) The saved Model is downloaded in downloads folder.

TODO

  • Add Loading and Saving model.
  • Add Canvas for drawing a digit and testing the model.
  • Improve the UI.
  • Add more flexibility to the model.