TensorFlow tutorial says that at creation time we need to specify the shape of tensors. That shape automatically becomes the shape of the tensor. It also says that TensorF
tf.Variable: Use the shape argument with None
A feature was added in 1.14 that allows to specify unknown shapes.
If shape is None, the initial shape value is used.
If shape is specified, this is used as the shape and allows to have None.
Example:
var = tf.Variable(array, shape=(None, 10))
This allows to later on assign values with shapes matching the shape above (e.g. arbitrary shapes in axis 0)
var.assign(new_value)