Technologies like machine learning, predictive analytics, natural language processing andartificial intelligence are the most trending and innovative technologies of 21st century. Whether it is an enterprise software or a simple photo editing application, they all are backed and rooted in machine learning technology making them smart enough to be a friend to humans. Until now, the tools and frameworks that were capable of running machine learning were majorly developed in languages like Python, R and Java. However, recently the web ecosystem has picked up machine learning into its fold and is achieving transformation in web applications.
Today in this article, we will look at the most useful and popular libraries to perform machine learning in your browser without the need of softwares, compilers, installations and GPUs.
Keras.js is another trending open source framework that allows you to run machine learning models in the browser. It offers GPU mode support using WebGL. If you have models in Node.js, you’ll run them only in CPU mode. Keras.js also offers support for models trained using any backend framework, such as the Microsoft Cognitive Toolkit (CNTK).
Some of the Keras models that can be deployed on the client-side browser include Inception v3 (trained on ImageNet), 50-layer Residual Network (trained on ImageNet), and Convolutional variational auto-encoder (trained on MNIST).
ML-JS provides machine learning tools for working with NodeJS and browsers. The ML JS tool can be set up using the following code:
The following machine learning algorithms are supported:
- Unsupervised learning
- Supervised learning
- Artificial neural network
The following are some important pages:
This popular library allows you to train neural networks in a browser or run pre-trained models in inference mode, and even claims it can be used as NumPy for the web. With an easy-to-pick-up API this library can be used for a verity for useful applications, and is actively maintained.
deeplearnjs — Hardware-accelerated deep learning // machine learning // NumPy library for the web.github.com
Synaptic is a well-liked machine learning library for training recurrent neural networks as it has in-built architecture-free generalized algorithm. Few of the in-built architectures include multilayer perceptrons, LSTM networks and Hopfield networks. With Synaptic, you can develop various in-browser applications such as Paint an Image, Learn Image Filters, Self-Organizing Map or Reading from Wikipedia.
Another recently developed framework especially for reinforcement learning tasks in your browser, is neurojs. It mainly focuses on Q-learning, but can be used for any type of neural network based task whether it is for building a browser game or an autonomous driving application. Some of the exciting features this library has to offer are full-stack neural network implementation, extended support to reinforcement learning tasks, import/export of weight configurations and many more. To see the complete list of features, visit the GitHub page.
Check out some live use cases for Tensorflow:
It has vast variety of tutorials and guides listed officially on its website here to get you started. It also provide model converters to run pre-existing TensorFlow models right in the browser or under Node.js.
In relation to ML, the list of libraries is given below:
– Binary classification via Stochastic gradient descent
For instance: @stdlib/ml/online-binary-classification
– Linear regression via Stochastic gradient descent
For example: @stdlib/ml/online-sgd-regression
– Natural language processing
For example: @stdlib/nlp