TypeError: List of Tensors when single Tensor expected - when using const with tf.random_normal
Someone else has answered this question on another thread.
Essentially, tf.constant()
takes a NumPy array as an argument or some sort of array or just a value.
tf.random_normal()
returns a Tensor which cannot be an argument to tf.constant()
.
To fix this, use tf.Variable()
instead of tf.constant()
.
See the answer from the link. The person explains it better.
tf.constant
is supposed to have a constant argument - value
. Here value
can be a constant value or a list of values of type dtype
. You can't create a constant tensor that has another tensor as its value.