Paul Krill
Editor at Large

Google’s Deeplearn.js brings machine learning to the browser

news
Aug 15, 20172 mins

The open source GPU-accelerated library supports TypeScript and JavaScript, allowing you to train neural networks or run pre-trained models

Artificial intelligence computer brain circuits electronics grid
Credit: Thinkstock

Google is offering an open source, hardware-accelerated library for machine learning that runs in a browser. The library is currently supported only in the desktop version of Google Chrome, but the project is working to support more devices. 

The Deeplearn.js library enables training of neural networks within a browser, requiring no software installation or back end. “A client-side ML library can be a platform for interactive explanations, for rapid prototyping and visualization, and even for offline computation,” Google researchers said. “And if nothing else, the browser is one of the world’s most popular programming platforms.”

Using the WebGL JavaScript API for 2D and 3D graphics, Deeplearn.js  can conduct computations on the GPU. This offers significant performance, thus getting past the speed limits of JavaScript, the researchers said.

Deeplearn.js imitates the structure of the company’s TensorFlow machine intelligence library and NumPy, a scientific computing package based on Python. “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 webpages for Deeplearn.js inference.”

Although Microsoft’s TypeScript is the language of choice, Deeplearn.js can be used with plain JavaScript. Demos of Deeplearn.js are featured on the project’s homepage. Deeplearn.js joins other projects that bring machine learning to JavaScript and the browser, including TensorFire, which allows execution of neural networks within a webpage, and ML.js, which provides machine learning and numerical analysis tools in JavaScript for Node.js.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author