学习维度转换
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,name = None)a = tf.constant([i for i in range(20)],shape =[2,2,5])
with tf.Session() as sess:
print (sess.run(tf.size(a)))结果:20
tf.rank(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.rank(a)))结果 : 3
tf.reshape(tensor, shape, name=None)a = tf.constant([i for i in range(20)],shape =[2,2,5])
with tf.Session() as sess:
print (sess.run(tf.reshape(a,shape = [5,2,2])))原始的数据

结果:

没理解,等理解了再来更新。
tf.squeeze(input, squeeze_dims=None, name=None)没理解,等理解了再来更新。
tf.expand_dims(input, dim, name=None)