TF Constants and Variables
Explore the core concepts of TensorFlow constants and variables, including how to create, manipulate, and apply them in deep learning. Understand immutable tensors and mutable variables, and how variables store model parameters that update during training.
We'll cover the following...
We'll cover the following...
In TF2, tensors can be of two types: constant or variable. However, TF1 supports placeholders for its default graph execution mode. Here, we explain some properties of both constants and variables.
TF constants
We can create immutable tensors with tf.constant(), where tf is an alias for TensorFlow. To generate a constant tensor, we can write tf.constant(15). If we type tf.constant([6., 4., 3.], [5., 1., 2.]) ...