TensorFlow Fundamentals
TensorFlow is a software platform for building machine learning models. You use it to work with numeric data, train models, and prepare them to run in environments such as servers, browsers, and devices.
itArtificial intelligence and machine learning | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — TensorFlow Fundamentals
TensorFlow is the machinery that takes numerical data and turns it into a machine-learning model that can run somewhere other than the notebook where it was assembled. That is a larger job than persuading a few layers to produce numbers. The layers are the polite part. Data, evaluation, and the destination runtime are where the paperwork begins.
The basic cargo is a tensor, a multidimensional array with a shape and a data type. Images, labels, batches, and model outputs all travel in this container. Tensors do not change in place, so trainable weights live in variables, the mutable state that training is allowed to alter. This separation is less mystical than it sounds. One thing carries values; the other is the thing the optimizer keeps adjusting until the loss stops complaining quite so loudly.
The training loop has an admirably direct plot. Inputs and labels enter a model. The model predicts. A loss measures error. Gradients describe how that error changes with respect to the weights, and an optimizer changes the weights. Keras, TensorFlow's high-level API, packages the routine as compile, fit, evaluate, and predict. Start there. A custom loop is not a graduation ceremony; it is for when the packaged loop no longer describes the work.
The surprise is that training success is not the finish line. A model can fit training data and still fail on new examples. Evaluation uses data that did not update the weights, which is why it is a check rather than a victory parade. Features, labels, shapes, and data types must also agree. A model cannot rescue a dataset that arrives in the wrong arrangement, however earnestly it applies gradients.
TensorFlow normally runs operations eagerly, so Python executes them as it reaches them. When a computation needs graph execution or export, tf.function captures TensorFlow operations into a graph. That graph and its variables can become a SavedModel, the portable artifact for a server, browser, mobile, or other TensorFlow runtime. Export is therefore part of the model's job description, not a decorative zip file at the end.
Continue with the Intro for the full map of tensors, variables, data pipelines, and deployment choices. Use Slides when the relationships need a compact diagram. Keep the Cheatsheet nearby when selecting Keras, Core, tf.data, tf.function, or SavedModel. Then use the practice session to make a small classifier train, evaluate, export, and reload. The machine is not offended by a careful sequence. It rather depends on one.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.tensorflow.org/
Supports
- TensorFlow as an end-to-end machine learning platform
- TensorFlow ecosystem components including TensorFlow.js, LiteRT, tf.data, TFX, and TensorBoard
- https://www.tensorflow.org/guide/basics
Supports
- Tensors as multidimensional arrays with shape and data type
- Variables as mutable state and tensors as immutable
- Automatic differentiation with GradientTape
- tf.function graph capture and export
- Modules, models, SavedModel, and custom training loops
- https://www.tensorflow.org/guide/keras
Supports
- Keras as TensorFlow's high-level API
- Keras as the normal starting API for TensorFlow users
- Layers as transformations and models as directed acyclic graphs of layers
- https://www.tensorflow.org/tutorials/quickstart/beginner
Supports
- Keras compile configuration
- Model.fit adjusting parameters to minimize loss
- The beginner Keras training and evaluation workflow
- https://www.tensorflow.org/guide
Supports
- Official guide areas for data input pipelines, SavedModel, accelerators, and performance
- https://www.tensorflow.org/guide/data
Supports
- tf.data input pipeline construction and transformations
- Batching, shuffling, and preprocessing in input pipelines
- https://www.tensorflow.org/guide/function
Supports
- tf.function tracing and graph execution behavior
- https://www.tensorflow.org/guide/saved_model
Supports
- SavedModel save, load, and signature behavior
- https://github.com/josephmisiti/awesome-machine-learning
Supports
- TensorFlow resource section with Awesome Keras and Awesome TensorFlow
- https://github.com/jtoy/awesome-tensorflow
Supports
- TensorFlow projects, libraries, and learning material beyond official documentation
- https://developers.google.com/machine-learning/guides/rules-of-ml/
Supports
- Training-serving skew from data and pipeline differences
- Logging serving features and reusing training and serving code
- Testing with data collected after the training period
- https://www.tensorflow.org/tfx/guide/serving
Supports
- TensorFlow Serving integration with TensorFlow models and production serving
- https://www.tensorflow.org/js
Supports
- TensorFlow.js model development and execution in browsers and Node.js
- Conversion of Python TensorFlow models for JavaScript runtimes
- https://developers.google.com/edge/litert
Supports
- LiteRT conversion and on-device deployment of TensorFlow models
- https://blog.google/innovation-and-ai/products/tensorflow-smarter-machine-learning-for/
Supports
- TensorFlow open-source release in November 2015
- https://opensource.googleblog.com/2016/11/celebrating-tensorflows-first-year.html
Supports
- First-year additions including distributed training and iOS and Raspberry Pi support
- https://opensource.googleblog.com/2017/02/announcing-tensorflow-10.html
Supports
- TensorFlow 1.0 announcement and XLA performance work
- https://blog.tensorflow.org/2018/03/introducing-tensorflowjs-machine-learning-javascript.html
Supports
- TensorFlow.js introduction for browser and JavaScript machine learning
- https://blog.tensorflow.org/2018/03/introducing-tensorflow-hub-library.html
Supports
- TensorFlow Hub introduction for reusable machine-learning modules
- https://blog.tensorflow.org/2019/09/tensorflow-20-is-now-available.html
Supports
- TensorFlow 2.0 release, Keras integration, eager execution, and SavedModel standardization
- https://blog.tensorflow.org/2020/07/whats-new-in-tensorflow-2-3.html
Supports
- TensorFlow 2.3 input-pipeline and tf.data service improvements
- https://blog.tensorflow.org/2022/05/whats-new-in-tensorflow-2-9.html
Supports
- TensorFlow 2.9 and DTensor for distribution
