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.
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
- model parallelismused by · Model parallelism is a distributed-computing technique that partitions a machine-learning model’s parameters, layers, or computations across multiple devices.
- tensoruses · A tensor is a multidimensional numerical array whose values are arranged along indexed dimensions and can be manipulated through mathematical computation.
- variablecontrasts with · A variable is a named program construct that associates an identifier with a value for reference and, where permitted, reassignment during computation.
- mathematical variableuses · A variable is a symbol or named representation for a quantity, value, or attribute that may vary across assignments, observations, or time.
Questions about variable
What is 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.
Which Manning books explain variable?
Deep Learning with R, Third Edition and Deep Learning with Python, Third Edition.
What is the difference between variable and 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. A variable is a named program construct that associates an identifier with a value for reference and, where permitted, reassignment during computation.
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.

