Spreading the use of machine learning tools is one of the goals of Google’s PAIR (People + AI Research) initiative, which was introduced in early July. Last week the cloud giant released deeplearn.js as part of that initiative. Deeplearn.js an open source WebGL-accelerated JavaScript library for machine learning that runs entirely in a browser.
Writing on the Google Research blog last Friday, software engineers Nikhil Thorat and Daniel Smilkov noted, “There are many reasons to bring machine learning into the browser. A client-side ML library can be a platform for interactive explanations, for rapid prototyping and visualization, and even for offline computation. And if nothing else, the browser is one of the world’s most popular programming platforms.”
One can envision having the power of AI programming in a browser connected to specialized backend HPC architectures, such as Google Tensor Cloud, would be a useful tool.

Thorat and Smilkov wrote, “While web machine learning libraries have existed for years (e.g., Andrej Karpathy’s convnetjs) they have been limited by the speed of Javascript, or have been restricted to inference rather than training (e.g., TensorFire). By contrast, deeplearn.js offers a significant speedup by exploiting WebGL to perform computations on the GPU, along with the ability to do full backpropagation.”
According to the blog, the API mimics the structure of TensorFlow and NumPy, with a delayed execution model for training (like TensorFlow) and intermediate execution model for inference (like Numpy).
“We have also implemented versions of some of the most commonly-used TensorFlow operations. With the release of deeplearn.js, we will be providing tools to export weights from TensorFlow checkpoints, which will allow authors to import them into web pages for deeplearn.js inference,” wrote Thorat and Smilkov.
“Our vision is that this library will significantly increase visibility and engagement with machine learning, giving developers access to powerful tools while simultaneously providing the everyday user with a way to interact with them. We’re looking forward to collaborating with the open source community to drive this vision forward.”
It will be interesting to follow other tool releases under the PAIR umbrella.
Link to blog: https://research.googleblog.com/2017/08/harness-power-of-machine-learning-in.html#gpluscomments