Digital Inputs and Outputs from an IoT device using Neural Network

Using 8 digital inputs (Think Bits) and 4 digital outputs, say from an IoT device such as an internet connected Arduino, Particle Photon (or the new Mesh devices ), Raspberry Pi or similiar IoT sensor Actuator arrangement.

This example shows how to take a small set of sensor inputs and actuator outputs train a Neural Network and then continuously monitor your IoT setup.

Note: This is a theoretical setup, in actual practice I am sure it would be much harder to train and fine tune. See my Robotics Github with a long list of video tutorials. Like the xOr example the inputs and outputs will be a series of ones and zeros, say for a smart garden


Now lets try the above in a full Machine Learning Web App

Tensorflowjs Machine Learning Web App Template

As simple as possible template. Note that for simplicity this has minimal CSS

Pre-Set Values:

Learning Rate:
Samples per batch:
Epochs: (# of batches to run)
Validation Split :



Compile or Load Model:

Compile, Train, Test: Import / Export
Compile Model:
Train Model: Epochs run:
Test Trained Model with New Data: New Data:Shape:




This Github, ... this Github Website Version, ... this Hosted Website Version, ... Tensorflowjs

By Jeremy Ellis
Use at your own risk!