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
As said by Mayou36, you can now change the variable shape after it was first declared. Here is a working example:
v = tf.Variable([1], shape=tf.TensorShape(None), dtype=tf.int32) tf.print(v) v.assign([1, 1, 1]) tf.print(v)
And this outputs:
[1] [1 1 1]