MNIST CNN Transfer Learning Description This example demonstrates 're-training' of a pre-trained model in the browser. The model was initially training-mode in Python and converted to TensorFlow.js format. The model can then be further trained using data from the browser. Re-training an already trained network is called transfer learning. In this case the pretrained model has been trained on a subset of the MNIST data: only digits 0 - 4. The data we'll use for transfer learning in the browser consists of the digits 5 - 9. This example shows that the first several layers of a pretrained model can be used as feature extractors on new data during transfer learning and thus result in faster training on the new data. Status Load Model Load hosted pretrained model Load local pretrained model Retrain Model When retraining the model 3 different approaches are available. Freeze feature layers: This is the most typical transfer learning procedure, we freeze the first seven layers of the base model and only allow the final 5 layers to be trained on the new data. Don't freeze feature layers: Choose this option to compare with the default option. A few things to pay attention to include longer model convergence time and more larger shifts in weights (and thus loss values) as the model trains. Reinitialize weights: This will reset all the weights, effectively training the model from scratch. Training mode: Freeze feature layers Don't freeze feature layers Reinitialize weights Epochs Retrain Test Model Below is an "ASCII" bit map of some test examples from the digits in the new data set for transfer learning: digits 5 through 9. The numbers are the grayscale integer values from the image. You can edit the values below to see the effect of editing pixel values on the classification probabilities output by the model below. Select test example 5_1 5_2 5_3 5_4 5_5 5_6 5_7 5_8 5_9 5_10 6_1 6_2 6_3 6_4 6_5 6_6 6_7 6_8 6_9 6_10 7_1 7_2 7_3 7_4 7_5 7_6 7_7 7_8 7_9 7_10 8_1 8_2 8_3 8_4 8_5 8_6 8_7 8_8 8_9 8_10 9_1 9_2 9_3 9_4 9_5 9_6 9_7 9_8 9_9 9_10 Model Output Output class: