学习维度转换
shape 计算维度
tf.shape(input,name = None)
案例1
a = tf.constant([i for i in range(20)],shape =[2,2,5])
with tf.Session() as sess:
print (sess.run(tf.shape(a)))
结果:[2 2 5]
size 计算元素个数
tf.size(input,n
学习维度转换
tf.shape(input,name = None)
a = tf.constant([i for i in range(20)],shape =[2,2,5])
with tf.Session() as sess:
print (sess.run(tf.shape(a)))
结果:[2 2 5]
tf.size(input,n