Overview

The goal of TryML is to build a web application to allow users to experiment with training a neural network using different parameters, techniques/features, and underlying machine learning frameworks.

Functionally, the plan is to build a multi-user single page web application which allows users to do the following...

  • Adjust parameters, and train a feed forward neural network to learn to recognise handwritten numbers from the MNIST database.
  • Draw numbers in the UI and test how well the network recognises them.
  • Browse individual numbers in the MNIST set and test how well the network recognises them.
  • Potentially show a visualization of the weights in the hidden units of the network.
  • Allow training the network with different combinations of parameters, features, network configuration (numbers of hidden units, layers of hidden units, etc...), and machine learning frameworks.
MNIST Image
MINST '5' digit image

The project will be a kind-of extension to BackpropagationVisualization, but with a bit more complex, interesting, and visually engaging context.

Technically the plan is to use Angular 2 for the UI, .NET Core for the service layer and middleware, and potentially Amazon DynamoDB for storage. I also want to have all deployment and infrastructure-related stuff fully automated... my instinct is to use Jenkins for this (since I've used it before), but it might also be worth looking at AWS CI/CD Pipelines (or maybe a combination of both). Given the backend processes are computationally expensive (i.e. training the network), it's a good chance to experiment with and implement the load balancing and auto-scaling features available in AWS.

Once the basic site/application is established, there are a lot of additional features, components, and technologies I want to experiment with and potentially implement...

  • User identification (via cookie), and preference storage
  • Feed progress of network training back to the UI
  • Use Selenium or a similar framework for automated UI tests
  • Try exposing the API layer via gRPC aswell as REST
  • Experiment with different deployment / hosting technologies for backend services (IIS, OWIN, Docker)
  • Flexible deployment of backend microservices... i.e. all in separate hosting instances, or all on one machine/instance... controllable via configuration
  • Experiment with AWS Security Groups, ACLs, and VPCs
  • Provide selection between different machine learning implementations and frameworks... e.g. SimpleML, TensorFlow, Python, etc...
  • Expose system logs, events through an authenticated web UI
  • Auto scaling for CPU intensive backend processes (e.g. training the neural network)
  • Email alerting for any error, and for excessive traffic, or excessive scaling
  • Blue / green deployments
  • Cache service for weights resulting from training
  • Engine to predict the remaining training time based on environment, and stats from previous training runs. Report the predicted training time via a UI progress bar.
  • Create a screen which allows browsing/selecting MNIST images and testing them against a trained network.
  • Build a client-side javascript model to collect all user behaviour (option selection, clicks, timing, etc...)... cache this on the client side and periodically upload via service call.
  • Make the backend service API callable externally... proper error handling/reporting via appropriate HTTP status codes (for the REST implementation)
  • Think about using NodeJS for some of the backend services
  • Utilize MathematicsModularFramework as one ML framework option, and enhance it to allow streaming of data through a module graph... i.e. avoid needing to read all MNIST images into memory at once during neural network training.

Development Process

For previous personal projects, I'd usually document everything once the project was complete. This project is more ambitious, and will likely take longer... and what I learn day-to-day from the development/build process is probably more interesting than the final product. So I'm going to document the project step by step through regular blog posts, as things progress. I'll also do frequent check-ins, and use git's tagging feature to make it easy to see intermediate versions of code retrospectively.

Latest blog posts can be found here.