ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

TensorFlow for JavaScript development

Before starting on the learning materials below, you should:

  1. Be comfortable with browser programming using HTML, CSS, & JavaScript

  2. Be familiar with using the command line to run Node.js scripts

This curriculum is for people who want to:

  1. Build ML models in JavaScript

  2. Run existing models anywhere Javascript can run

  3. Deploy ML models to web browsers

TensorFlow.js lets you develop or execute ML models in JavaScript, and use ML directly in the browser client side, server side via Node.js, mobile native via React Native, desktop native via Electron, and even on IoT devices via Node.js on Raspberry Pi. To learn more about TensorFlow.js, and what can be done with it, check out this talk at Google I/O.

Step 1: Get introduced to machine learning in the browser

To get a quick introduction on basics for ML in JavaScript, watch the videos below that take you from first principles, to using existing pre-made models, and even building your own neural network for classification. You can also try the Make a smart webcam in JavaScript Codelab for an interactive walkthrough of these concepts.

Superpowers for next gen web apps: Machine Learning

This high level intro to machine learning in JavaScript is for web developers looking to take their first steps with TensorFlow.js.

Primeiros passos com o TensorFlow.js do TensorFlow

Uma série em três partes que aborda o treinamento e a execução de modelos de machine learning com o TensorFlow.js. Além disso, o curso mostra como criar um modelo de ML no JavaScript que é executado diretamente no navegador.

Make a smart webcam in JavaScript with a pre-trained model

Learn how to load and use one of the TensorFlow.js pre-trained models (COCO-SSD) and use it to recognize common objects it's been trained on.

Etapa 2: saiba mais sobre o aprendizado profundo

To get a deeper understanding of how neural networks work, and a broader understanding of how to apply them to different problems, we have two books available.

Learning TensorFlow.js is a great place to start if you are new to Tensors and Machine Learning generally but have a good understanding of JavaScript. This book takes you all the way from the basics such as understanding how to manipulate data into Tensors, to quickly progressing to real world applications. After reading, you will understand how to load existing models, pass data to them, and interpret data that comes out.

Deep Learning with JavaScript is also a great place to start. It is accompanied by a large number of examples from GitHub so you can practice working with machine learning in JavaScript.

This book will demonstrate how to use a wide variety of neural network architectures, such as Convolutional Neural Networks, Recurrent Neural Networks, and advanced training paradigms such as reinforcement learning. It also provides clear explanations of what is actually happening with the neural network in the training process.

Learning TensorFlow.js
by Gant Laborde

A hands-on end-to-end approach to TensorFlow.js fundamentals for a broad technical audience. Once you finish this book, you'll know how to build and deploy production-ready deep learning systems with TensorFlow.js.

Deep Learning with JavaScript
by Shanqing Cai, Stanley Bileschi, Eric D. Nielsen with Francois Chollet

Escrito pelos principais autores da biblioteca do TensorFlow, este livro mostra casos de uso fascinantes e instruções detalhadas para apps de aprendizado profundo em JavaScript no navegador ou no Node.

Etapa 3: pratique com exemplos usando o TensorFlow.js

Practice makes perfect, and getting hands on experience is the best way to lock in the concepts. Check out the TensorFlow.js codelabs to further your knowledge with these step by step guides for common use cases:

  1. Make your very own “Teachable Machine” from a blank canvas

  2. Handwritten digit recognition with Convolutional Neural Networks

  3. Make predictions from 2D data

  4. Convert a Python SavedModel to TensorFlow.js format

  5. Use Firebase to deploy and host a TensorFlow.js model

  6. Build a comment spam detection system

  7. Retrain a comment spam detection model to handle custom edge cases

  8. Audio recognition using transfer learning

With your knowledge of neural networks, you can more easily explore the open sourced examples created by the TensorFlow team. They are all available on GitHub, so you can delve into the code and see how they work.

Exemplos criados com o TensorFlow.js

Repositório do GitHub com exemplos implementados no TensorFlow.js. Os exemplos de diretório são independentes e podem ser copiados para outro projeto.

Consulte nossos tutoriais para saber como começar a usar o TensorFlow.js

Os tutoriais do TensorFlow são escritos como notebooks do Jupyter e executados diretamente no Google Colab, um ambiente de notebook hospedado que não precisa de configuração. Clique no botão "Executar no Google Colab".

Etapa 4: faça algo novo

Once you've tested your knowledge, and practiced with some of the TensorFlow.js examples, you should be ready to start developing your own projects. Take a look at our pretrained models, and start building an app in minutes. Or you can train your own model using data you've collected, or by using public datasets. Kaggle and Google Dataset Search are great places to find open datasets for training your model.

If you are looking for inspiration, check out our Made With TensorFlow.js show and tell episodes from people all around the world who have used TensorFlow.js in their applications.

You can also see the latest contributions from the community by searching for the #MadeWithTFJS hashtag on social media.