Defining Variables and Output in TensorFlow
Learn to define variables and output in TensorFlow.
We'll cover the following...
Defining variables in TensorFlow
Variables play an important role in TensorFlow. A variable is essentially a tensor with a specific shape defining how many dimensions the variable will have and the size of each dimension. However, unlike a regular TensorFlow tensor, variables are mutable, meaning that the value of the variables can change after they are defined. This is an ideal property to have to implement the parameters of a learning model (for example, neural network weights), where the weights change slightly after each step of learning. For example, if we define a variable with x = tf.Variable(0,dtype=tf.int32)
, we can change the value of that variable using a ...