liveBook · Manning

Variable

A TensorFlow variable is a mutable tensor-like object that stores state, such as model parameters, and can be updated or marked trainable for differentiation.

How 2 Manning books explain it

Deep Learning with R, Third Edition

A TensorFlow variable is a mutable tensor-like object that stores modifiable model state and can be updated by assignment.

How it is used
Stores mutable neural-network state and supplies values that training computations can update.
How deep it goes
Defines creation, full and indexed assignment, additive updates, and gradient tracking, but does not develop optimizer internals.
Examples
Uses zero- and one-filled matrices, indexed updates, additive updates, and a squared variable inside GradientTape.
What you can do after
Operate/configure it through tf$Variable, assign(), indexed assignment, assign_add(), and GradientTape.

Read how Deep Learning with R, Third Edition explains variable →

Deep Learning with Python, Third Edition

A mutable TensorFlow value that stores learnable parameters such as weights and bias in this example.

How it is used
Provides mutable state for TensorFlow models whose parameters change during gradient-based training.
How deep it goes
Defines mutability and demonstrates whole-value, subset, additive, and subtractive assignment before applying updates in a classifier.
Examples
Uses a random variable v and classifier parameters W and b, updated with assign, indexed assignment, assign_add, and assign_sub.
What you can do after
Apply it via TensorFlow to create mutable parameters and update them during a handwritten training loop.

Read how Deep Learning with Python, Third Edition explains variable →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.