OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

TensorFlow.js

TensorFlow.js is an open-source, hardware-accelerated JavaScript library for training and deploying machine-learning models in browsers and Node.js. It provides APIs for creating models, preparing data, importing existing TensorFlow models, and running or retraining models with client-side data.

Independent OpenViST project profile, based on linked sources.

TensorFlow.js — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use TensorFlow.js when the model workflow needs to live in JavaScript, particularly in a browser or Node.js application, or when an existing TensorFlow model needs a browser-oriented execution path.

Who it is for

  • JavaScript and TypeScript developers building machine-learning features for web applications
  • Teams creating Node.js services that use the TensorFlow.js API
  • Developers adapting existing TensorFlow models for browser execution
  • Experimenters training models with browser data or supported hardware-accelerated backends

Documented uses

  • Build and train machine-learning models with low-level or high-level JavaScript APIs
  • Load and prepare data for model workflows
  • Convert existing TensorFlow models for use in TensorFlow.js
  • Run inference from existing models in the browser
  • Retrain models using sensor data or other client-side data
Before you choose

Requirements & limits

The project is publicly accessible and open source under the Apache-2.0 licence. The documented entry points are a browser script tag or installation through NPM or Yarn.

  • Browser execution can use CPU, WebGL, WebAssembly or WebGPU backends exposed by the project.
  • Node.js support is provided through a TensorFlow C++ adapter rather than the browser backends.
  • The package set is modular, allowing individual packages to be imported when bundle size matters.
  • The NPM workflow uses ES2017 syntax and requires a modern browser or a bundler/transpiler.
  • The model converter is relevant when the starting point is an existing TensorFlow SavedModel.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Add TensorFlow.js to a browser page and train a small model

Set up TensorFlow.js in an HTML file and follow the documented linear-regression training flow.

Before you start

  • An HTML file
  • A browser
  • The TensorFlow.js distribution loaded with the documented jsDelivr script tag

Steps

  1. Add the TensorFlow.js script tag to the HTML file.

  2. Create a sequential model with a dense layer for one-dimensional input.

  3. Compile the model with mean squared error loss and the stochastic-gradient-descent optimizer.

  4. Create the documented tensor data, train the model with model.fit, and call model.predict after training.

Expected outcome

A browser page contains a TensorFlow.js model that trains on the example data and prints a prediction in the browser developer tools.

Guide limitations

  • This recipe covers the documented browser example only; it does not establish performance or compatibility across browsers or devices.
Source-based practical guide

Add TensorFlow.js to a JavaScript project with NPM or Yarn

Prepare a JavaScript project to use TensorFlow.js through a package manager and a build workflow.

Before you start

  • A JavaScript project
  • NPM or Yarn
  • A modern browser or a bundler/transpiler that can handle ES2017 syntax
  • A build tool such as Parcel, Webpack or Rollup

Steps

  1. Add TensorFlow.js to the project with NPM or Yarn.

  2. Import TensorFlow.js in the project with the documented JavaScript module syntax.

  3. Use a build tool or bundler workflow to process the project.

  4. Continue with the documented model-definition, compilation, training and prediction example.

Expected outcome

The project is set up to use TensorFlow.js through its JavaScript module API.

Guide limitations

  • The cited getting-started material documents setup and an example flow but does not provide a complete project configuration for every build tool.
COMPARE OPTIONS

Compare options for Model inference and serving

These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.

ProjectDocumented purposePlatformAccess and requirements
TensorFlow.jsBuild and train machine-learning models with low-level or high-level JavaScript APIsServer, WebThe project is publicly accessible and open source under the Apache-2.0 licence. The documented entry points are a browser script tag or installation through NPM or Yarn.
HyperposeCustomize pose-estimation architectures and datasets.Docker, Linux, macOS, Windows
Multi Task NlpDefine multiple tasks and their data and model settings in a YAML file.Linux, macOS, WindowsThe project is an open-source library under the Apache-2.0 license, distributed through its public GitHub repository.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
2 October 2026
Original website title
tensorflow/tfjs · Official homepage title · retained in its source language