TensorFlow.js
TensorFlow.js

A JavaScript library for training and deploying ML models in the browser and on Node.js

Develop ML with JavaScript
Use flexible and intuitive APIs to build and train models from scratch using the low-level JavaScript linear algebra library or the high-level layers API
Run Existing Models
Use TensorFlow.js model converters to run pre-existing TensorFlow models right in the browser or under Node.js.
Retrain Existing Models
Retrain pre-existing ML models using sensor data connected to the browser, or other client-side data.

Built With TensorFlow.js

Use your phone’s camera to identify emojis in the real world. Can you find all the emojis before time expires?
Play Pac-Man using images trained in your browser.

Getting Started

New To Machine Learning?

Want to get started with Machine Learning but not worry about any low level details like Tensors or Optimizers? Check out these high level coding APIs and learning resources.

Do you want to code ML programs without dealing directly with Tensors?

The ml5.js library provides access to machine learning algorithms and models in the browser with a concise, approachable API.

Check out ml5.js

Are you looking to incorporate pre-trained models into your web-app?

Check out tfjs-models, a collection of pre-built models that doesn't require deep knowledge of Tensors.

Check out tfjs-models

Are you looking for a gentle introduction to machine learning concepts with JavaScript?

Check out The Coding Train’s Introduction to Neural Networks and Machine Learning with TensorFlow.js.

See the videos


Ready to Start Coding with TensorFlow.js?

Comforable with concepts like Tensors, Layers, Optimizers and Loss Functions (or are willing to get comfortable with them)? TensorFlow.js provides flexible building blocks for neural network programming in JavaScript.

Get Setup with TensorFlow.js

See how to get up and runnning with TensorFlow.js code in the browser or Node.js.

Get Setup

Convert Pretained Models to TensorFlow.js

Learn how to convert pretrained models from python into TensorFlow.js

SavedModel    Keras Model

Learn from existing TensorFlow.js code

tfjs-examples provides small code examples that implement various ML tasks using TensorFlow.js.

See it on GitHub

Visualize the Behaviour of your TensorFlow.js Model

tfjs-vis is a small library for in browser visualization intended for use with TensorFlow.js.

See it on GitHub    See Demo

Get your data ready for processing with TensorFlow.js

TensorFlow.js has support for processing data using ML best practices.

See docs


Learning & Community

Learning Resources

Tutorials & Guides

We have a number of tutorials on various topics with TensorFlow.js.

See tutorials & guides

API Docs

Out API docs provide code samples you can run right in the page.

API docs

Examples

tfjs-examples provides small code examples that implement various ML tasks using TensorFlow.js.

See it on GitHub