tf.shape()
import tensorflow as tf
x = tf.constant([2,3,4,5])
shape = tf.shape(x)
with tf.Session() as sess:
print(sess.run(shape))
tensor.get_shape().as_list()
import tensorflow as tf
x = tf.constant([2,3,4,5])
shape1 = x.get_shape()
shape2 = x.get_shape().as_list()
with tf.Session() as sess:
print(sess.run(shape1))
print(sess.run(shape2))