# tensorflow/tfjs

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/tensorflow-tfjs).**

19,134 stars · 2,025 forks · TypeScript · Apache-2.0

## Links

- GitHub: https://github.com/tensorflow/tfjs
- Homepage: https://js.tensorflow.org
- awesome-repositories: https://awesome-repositories.com/repository/tensorflow-tfjs.md

## Description

TensorFlow.js is a JavaScript machine learning library used for training and deploying models in web browsers and server-side environments. It functions as a browser-based model trainer, a WebAssembly inference engine, and a WebGPU accelerated tensor library for low-level linear algebra. The project also includes a model converter to transform Python-based models into optimized formats for JavaScript execution.

The library distinguishes itself through a pluggable backend architecture that allows mathematical operations to be executed via CPU, WebGL, or WebGPU. It supports the conversion of Python Keras or SavedModel formats into JSON and binary formats, and can translate JavaScript models back into Python formats.

The framework covers a broad set of capabilities including deep learning architecture construction, on-device model retraining, and data pipeline management for batching and shuffling datasets. It provides specialized implementations for real-time computer vision, keyword spotting in audio, textual similarity analysis, and time series forecasting. Performance is managed through weight quantization, sharding, and model performance profiling to record operator-level latency.

The project includes command-line utilities for model inference and a guided wizard to generate conversion commands.

## Tags

### Artificial Intelligence & ML

- [JavaScript Machine Learning Libraries](https://awesome-repositories.com/f/artificial-intelligence-ml/javascript-machine-learning-libraries.md) — Implements a comprehensive library for training and deploying machine learning models using JavaScript in browsers and servers.
- [Web-Based Model Deployment](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-deployment-and-serving/deployment-pipelines-and-endpoints/web-based-model-deployment.md) — Runs machine learning models in web browsers and server environments using hardware-accelerated runtimes. ([source](https://github.com/tensorflow/tfjs#readme))
- [Automatic Differentiation](https://awesome-repositories.com/f/artificial-intelligence-ml/automatic-differentiation.md) — Provides automatic differentiation for computing gradients during neural network training.
- [Client-Side Inference](https://awesome-repositories.com/f/artificial-intelligence-ml/client-side-inference.md) — Deploys pre-trained models to user devices for local data processing, improving privacy and reducing latency.
- [Deep Learning Architectures](https://awesome-repositories.com/f/artificial-intelligence-ml/deep-learning-architectures.md) — Provides high-level APIs for building and training complex multi-layered neural network architectures. ([source](https://github.com/tensorflow/tfjs/blob/master/tfjs-layers))
- [GPU-Accelerated Inference](https://awesome-repositories.com/f/artificial-intelligence-ml/gpu-accelerated-inference.md) — Accelerates model inference and training using graphics processing units to increase computation speed in web and mobile contexts. ([source](https://github.com/tensorflow/tfjs/tree/master/tfjs-react-native))
- [Pluggable Backend Architectures](https://awesome-repositories.com/f/artificial-intelligence-ml/hardware-acceleration-backends/pluggable-backend-architectures.md) — Implements a pluggable architecture to swap mathematical backends between CPU, WebGL, and WebGPU.
- [JavaScript Model Training](https://awesome-repositories.com/f/artificial-intelligence-ml/javascript-model-training.md) — Provides the capability to define, train, and optimize neural networks using JavaScript.
- [Python-to-JavaScript Model Conversions](https://awesome-repositories.com/f/artificial-intelligence-ml/model-format-converters/gguf-format-conversions/python-to-javascript-model-conversions.md) — Transforms Python Keras or SavedModel formats into optimized JSON and binary formats for web execution.
- [Neural Network Construction](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-network-construction.md) — Supports the design and construction of neural networks using both high-level layer abstractions and low-level APIs. ([source](https://github.com/tensorflow/tfjs#readme))
- [Browser-Based Trainers](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-networks/neural-network-trainers/browser-based-trainers.md) — Provides a framework for building and updating neural networks using real-time sensor data directly within the browser.
- [Node.js ML Execution](https://awesome-repositories.com/f/artificial-intelligence-ml/node-js-ml-execution.md) — Executes machine learning models in server-side Node.js environments using native binaries for high-performance processing. ([source](https://github.com/tensorflow/tfjs/blob/master/tfjs-node))
- [Web-Based Machine Learning](https://awesome-repositories.com/f/artificial-intelligence-ml/web-based-machine-learning.md) — Enables building and running machine learning models directly within the web browser using JavaScript.
- [Client-Side Training](https://awesome-repositories.com/f/artificial-intelligence-ml/client-side-training.md) — Enables the updating and training of machine learning models using real-time sensor data entirely within the web browser. ([source](https://github.com/tensorflow/tfjs/blob/master/README.md))
- [CPU-Based ML Execution](https://awesome-repositories.com/f/artificial-intelligence-ml/cpu-based-ml-execution.md) — Allows machine learning computations to run on the central processing unit as a fallback when hardware acceleration is unavailable. ([source](https://github.com/tensorflow/tfjs/blob/master/tfjs-backend-cpu))
- [Data Preparation](https://awesome-repositories.com/f/artificial-intelligence-ml/data-preparation.md) — Transforms raw datasets through filtering, mapping, shuffling, and batching for model consumption. ([source](https://github.com/tensorflow/tfjs/blob/master/tfjs-data))
- [Graph Model Transformations](https://awesome-repositories.com/f/artificial-intelligence-ml/graph-model-transformations.md) — Transforms high-level neural network layers into static computational graphs to optimize inference speed.
- [Edge Model](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/frameworks/inference-runtimes/edge-model.md) — Runs lightweight, pre-trained edge models for tasks like image and object classification with automated data normalization. ([source](https://github.com/tensorflow/tfjs/blob/master/tfjs-automl))
- [Model Performance Benchmarking](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-evaluation-analysis/model-analysis/model-performance-benchmarking.md) — Provides standardized tests to measure the execution speed and accuracy of models. ([source](https://github.com/tensorflow/tfjs#readme))
- [Weight Sharding](https://awesome-repositories.com/f/artificial-intelligence-ml/model-weight-management/weight-distribution/weight-sharding.md) — Splits large model weights into smaller binary shards to optimize browser caching and parallel loading.
- [Model Retraining](https://awesome-repositories.com/f/artificial-intelligence-ml/on-device-models/model-retraining.md) — Supports updating machine learning models on the client side using real-time sensor data. ([source](https://github.com/tensorflow/tfjs#readme))
- [Weight Quantization](https://awesome-repositories.com/f/artificial-intelligence-ml/quantized-inference-runtimes/weight-quantization.md) — Reduces model file size and memory usage by compressing weights into lower-precision formats.
- [TensorFlow Model Inference](https://awesome-repositories.com/f/artificial-intelligence-ml/tensorflow-model-inference.md) — Performs inference on compact TFLite model files loaded from URLs using an environment-optimized runtime. ([source](https://github.com/tensorflow/tfjs/tree/master/tfjs-tflite))

### DevOps & Infrastructure

- [TensorFlow](https://awesome-repositories.com/f/devops-infrastructure/model-conversion/tensorflow.md) — Transforms Python-based TensorFlow models into optimized JSON and binary formats for execution in JavaScript environments.
- [WebAssembly Inference Runtimes](https://awesome-repositories.com/f/devops-infrastructure/model-conversion/tensorflow/webassembly-inference-runtimes.md) — Provides a WebAssembly runtime for executing model inference with near-native CPU performance in browsers.
- [Model Conversion](https://awesome-repositories.com/f/devops-infrastructure/model-conversion.md) — Transforms existing models from various frameworks into compatible formats for execution within JavaScript environments. ([source](https://github.com/tensorflow/tfjs#readme))
- [Keras](https://awesome-repositories.com/f/devops-infrastructure/model-conversion/keras.md) — Enables loading and converting Keras models for inference and transfer learning in JavaScript environments. ([source](https://github.com/tensorflow/tfjs/blob/master/tfjs-layers))
- [WebAssembly Inference Executions](https://awesome-repositories.com/f/devops-infrastructure/model-conversion/tensorflow/webassembly-inference-executions.md) — Provides a WebAssembly-based runtime to execute TensorFlow models for portable performance across operating systems.

### Graphics & Multimedia

- [WebGPU Accelerations](https://awesome-repositories.com/f/graphics-multimedia/gpu-accelerated-shaders/tensor-operations/webgpu-accelerations.md) — Leverages the WebGPU API to execute high-performance compute shaders for machine learning workloads.

### Scientific & Mathematical Computing

- [WebGL Tensor Acceleration](https://awesome-repositories.com/f/scientific-mathematical-computing/gpu-accelerated-computation/webgl-tensor-acceleration.md) — Uses WebGL shaders to perform parallel tensor computations on the graphics card.
- [Hardware-Accelerated Routines](https://awesome-repositories.com/f/scientific-mathematical-computing/linear-algebra-routines/hardware-accelerated-routines.md) — Performs low-level linear algebra operations using GPU and other hardware accelerators to optimize complex math. ([source](https://github.com/tensorflow/tfjs/tree/master/tfjs-core))
- [SIMD Parallel Computing](https://awesome-repositories.com/f/scientific-mathematical-computing/simd-parallel-computing.md) — Accelerates computations using multiple CPU cores and SIMD instructions through threaded binaries. ([source](https://github.com/tensorflow/tfjs/blob/master/tfjs-backend-wasm))

### Part of an Awesome List

- [Web-Optimized Format Conversions](https://awesome-repositories.com/f/awesome-lists/ai/gaussian-splatting/format-conversion/web-optimized-format-conversions.md) — Converts machine learning models into JSON and sharded binary formats optimized for web browser execution. ([source](https://github.com/tensorflow/tfjs/tree/master/tfjs-converter))
- [Cross-Platform Model Execution](https://awesome-repositories.com/f/awesome-lists/ai/running-models/cross-platform-model-execution.md) — Enables the execution of machine learning models across both web browser and server-side environments for consistent performance. ([source](https://github.com/tensorflow/tfjs#readme))
- [Real-Time Vision Classifications](https://awesome-repositories.com/f/awesome-lists/media/camera-and-vision/real-time-vision-classifications.md) — Implements real-time pose estimation, object tracking, and image classification using browser webcam feeds.
- [Deep Learning Frameworks](https://awesome-repositories.com/f/awesome-lists/ai/deep-learning-frameworks.md) — JavaScript library for training and deploying models in browsers.
- [Machine Learning](https://awesome-repositories.com/f/awesome-lists/ai/machine-learning.md) — WebGL-accelerated ML library for training and deployment.

### Data & Databases

- [Model Asset Loading](https://awesome-repositories.com/f/data-databases/metadata-asset-retrieval/model-asset-loading.md) — Fetches serialized model weights and architecture files from remote URLs or local storage. ([source](https://github.com/tensorflow/tfjs/blob/master/e2e/benchmarks/local-benchmark/README.md))
- [Multi-Format Data Loading](https://awesome-repositories.com/f/data-databases/tabular-data-frameworks/csv-data-loaders/multi-source-csv-loading/multi-format-data-loading.md) — Imports datasets from disk or web sources in various formats for machine learning use. ([source](https://github.com/tensorflow/tfjs/tree/master/tfjs-data))

### Development Tools & Productivity

- [GPU-Optimized Source Compilations](https://awesome-repositories.com/f/development-tools-productivity/package-sources/source-compilation/gpu-optimized-source-compilations.md) — Compiles the library from source to leverage specific CPU instructions for optimized processing speed. ([source](https://github.com/tensorflow/tfjs/blob/master/tfjs-node))
- [Performance Benchmarks](https://awesome-repositories.com/f/development-tools-productivity/performance-optimization-tools/performance-benchmarks.md) — Measures execution time and memory usage across different devices to analyze system performance. ([source](https://github.com/tensorflow/tfjs/tree/master/e2e/benchmarks/browserstack-benchmark/README.md))

### Testing & Quality Assurance

- [Performance Profiling](https://awesome-repositories.com/f/testing-quality-assurance/performance-testing-analysis/performance-profiling.md) — Records per-operator latency during inference to identify and resolve computational bottlenecks. ([source](https://github.com/tensorflow/tfjs/tree/master/tfjs-tflite))
