Handy TensorFlow.js API for Client-Side ML Development
TensorFlow.js provides a rich set of API methods to handle training data, execute training and inference on client-side. This post explains how to use this API through a simple and practical example.
Let’s look into TensorFlow.js API for training data handling, training execution, and inference. TensorFlow.js is awesome because it brings Machine Learning into the hands of Web developers, this provides mutual benefit. Machine Learning field gets more developers and supporters, while Web development becomes more powerful with the support of Machine Learning.
I had a post in the past about TensorFlow.js — Comprehensive TensorFlow.js Example. This post was to show how to build a practical use case with TensorFlow.js. Today I will focus on TensorFlow.js API and show how to fetch data, train model and run prediction all with out of the box API.
I thought to keep the sample application as simple as possible, without using any particular JavaScript framework/toolkit. This would allow you to download the sample code and run it quickly. Sample application (GitHub repo) runs as HTML page, to test it locally you would need to use HTTP server. I would recommend using HTTP-Server from…