Machine Learning with JavaScript : Part 1
Abhishek Soni
1.1K31

Great article, we need more of those to encourage the development and use of Machine Learning libraries in JS.

I have been researching the subject for a while and below you will find some suggestions.
A lot of the performance comes from how you define the underlying Matrix. You should look at ndarray for fast multidimensional javascript array operations or weblas for GPU (WebGL) accelerated Javascript matrix operations.

They are both used by keras.js and will be used in the next SynapticJs compute engine Florida. However one of the drawbacks of Keras.Js is this library is limited to inference and doesn’t do training.

ConvnetJs, that you mentioned, is unfortunately no longer maintained, Andrej Karpathy, who has contributed a lot to the development of Machine Learning in Javascript, is gone for better and bigger things at OpenAI.
However a recent MIT course on self-driving cars has been using ConvnetJs and developed a competition around it, called Deeptraffic.

The source code of Tensorflow playground is interesting and does both inference and training.

2 University projects are worth mentioning as well:

  • Lalolib, from the University of Lorraine (France) developed a series of tools for scientific computing in web pages, with its own ML.js library, an online book and quite a few resources
  • The University of Tokyo have published a number of Machine Learning libraries in Javascript, claiming to have the fastest Matrix library for Javascript (their claim, not mine), some of which leverage GPUPU or do distribution calculations with browsers (ie using a network of browsers). More recently, they released Webdnn to do deep neural network in browsers, using WebAssembly and leveraging WebGPU (Safari browsers only)

With the advances in Chrome V8 engine notably, Javascript execution is increasingly faster, so Machine Learning in the browser is a promising field.

Show your support

Clapping shows how much you appreciated D D’s story.