TD DR:
tf.reshapecan output an output form, but tf.zeroscannot:shapesupports integers (like static / defined ), as well as tensors (like dynamic / undefined ) for both functions.
Codes are more specific and understandable:
shape = [tf.constant([2])[0], tf.constant([3])[0]]
print(tf.reshape([1,2,3,4,5,6], shape))
print(tf.zeros(shape))
and this:
shape = [tf.constant([5])[0], 3]
print tf.reshape([1,2,3,4,5,6], shape)
When using Tensor(for example, tf.constant([2])[0]) as the quality shapeto create another Tensor(for example, tf.zeros(shape)), the form is always vague during the creation of the graph. However tf.reshape()different. It can output the exit form using the entry form and the given form (static part).
3 - ([6]); (2, 3) , . . tf.constant([5]), . ( , !)