16.8 ConvnetJS: Browser-Based Deep-Learning Training and Visualization

Training Stats

  • Pause button enables you to stop the learning and “freeze” the current dashboard visualizations
  • Clicking the resume button continues training
  • Presents training statistics, including the training and validation accuracy and a graph of the training loss.

Instantiate a Network and Trainer

  • Contains the JavaScript code that creates the convolutional neural network
    • Similar layers to the convnet we created
  • The ConvnetJS documentation shows the supported layer types and how to configure them
  • Can experiment with different layer configurations in the provided textbox and begin training an updated network by clicking the change network button

Network Visualization

  • Shows one training image at a time and how the network processes that image through each layer
  • Click Pause to inspect all the layers’ outputs for a given digit to get a sense of what the network “sees” as it learns
  • Network’s last layer produces the probabilistic classifications
  • Shows 10 squares—9 black and 1 white, indicating the predicted class of the current digit image

Example Predictions on Test Set

  • Shows random selection of test set images and top three possible classes for each digit
  • Highest probability is shown on a green bar
  • Length of each bar is a visual indication of that class’s probability

©1992–2020 by Pearson Education, Inc. All Rights Reserved. This content is based on Chapter 5 of the book Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and the Cloud.

DISCLAIMER: The authors and publisher of this book have used their best efforts in preparing the book. These efforts include the development, research, and testing of the theories and programs to determine their effectiveness. The authors and publisher make no warranty of any kind, expressed or implied, with regard to these programs or to the documentation contained in these books. The authors and publisher shall not be liable in any event for incidental or consequential damages in connection with, or arising out of, the furnishing, performance, or use of these programs.