TensorFlow
The open-source machine-learning library built by Google Brain and released in 2015. It works with tensors flowing through a computation graph and today shares the deep-learning throne with PyTorch.
TensorFlow is an open-source library for machine learning and numerical computation, developed by the Google Brain team and released in November 2015 under the Apache 2.0 license. It began as the in-house infrastructure Google used to train and deploy its own models, and opening it up turned it into one of the field's most influential tools.
As a complementary current description, TensorFlow is an open-source, end-to-end platform for building and deploying machine-learning models.
Its official documentation now presents it as an end-to-end platform for building and deploying models, able to run on servers, mobile phones, embedded systems and the browser itself. The goal is a single framework that can carry a model all the way from research to production.
Tensors, the computation graph and automatic differentiation
The name says most of it. A tensor is a multidimensional array of data—a generalization of vectors and matrices—and in TensorFlow those tensors «flow» through a computation graph, a structure whose nodes stand for mathematical operations and whose edges carry the data moving between them. This design lets the work be spread across CPUs, GPUs and other accelerators without rewriting the model.
What actually makes learning possible is automatic differentiation: TensorFlow computes on its own the gradients needed to adjust a model's parameters through backpropagation. The developer defines the architecture and the loss function; the library derives the operations and updates the weights over the course of training. Documentation: TensorFlow design paper.
TensorFlow 2.x, Keras and the ecosystem
The decisive leap came with TensorFlow 2.0, released in 2019. This version integrated Keras as its high-level API and adopted «eager» (immediate) execution by default, so operations run as you write them, much like ordinary Python, instead of first assembling a static graph. The result was a framework far easier to learn and debug, with no loss of performance.
A broad ecosystem grew around the core: TensorFlow Lite for mobile and embedded devices, TensorFlow.js for training and inference in the browser, and TensorBoard for visualizing metrics and graphs during training. On top of that comes hardware acceleration on GPUs and on TPUs, the chips Google designed specifically for this kind of computation. Documentation: official TensorFlow guides.
Up against PyTorch
TensorFlow's main counterweight is PyTorch, developed by Meta with an imperative, Python-native style. The PyTorch design paper explains that execution model; the TensorFlow guides now describe eager execution, Keras and deployment across its ecosystem. The difference can no longer be reduced to “dynamic versus static”, and those documents do not establish a universal usage hierarchy. Choosing between them means testing the API, deployment path, extensions and hardware a project needs, rather than assuming that research and production naturally belong to opposite camps.
Pieces using this term
- TensorFlow is infrastructure: model and data come separately (2023-10-11)
- Scaling Machine Learning: Four Different Bottlenecks (2023-05-09)
- Recommended Books (I) (2023-01-12)
This article was produced with artificial intelligence under human editorial oversight.