Introduction

TensorFlow.jsarrow-up-right, an open-source library you can use to define, train, and run machine learning models entirely in the browser, using Javascript and a high-level layers API.

ML running in the browser means:

  • No need to install any libraries or drivers. Just open a webpage, and your program is ready to run.

  • Ready to run with GPU acceleration. TensorFlow.js automatically supports WebGL, and will accelerate your code behind the scenes when a GPU is available.

  • Mobile device support, in which case your model can take advantage of sensor data, say from a gyroscope or accelerometer.

  • All data stays on the client, making TensorFlow.js useful for low-latency inference, as well as for privacy preserving applications.

Some Considerations:

  • You can import an existing, pre-trained model for inference.

    If you have an existing TensorFlow or Kerasarrow-up-right model you’ve previously trained offline, you can convert into TensorFlow.js format, and load it into the browser for inference.

  • You can re-train an imported model.

    You can use transfer learning to augment an existing model trained offline using a small amount of data collected in the browser using a technique called Image Retraining.

  • Author models directly in browser.

    You can use TensorFlow.js to define, train, and run models entirely in the browser using Javascript and a high-level layers API.

Last updated