第一个例子中 tf.placeholder(tf.float32, shape=(None, 1024)) 1024是指的数据的尺寸,None指的batch size的大小,所以可以是任何数。 第二个例子里 tf.placeholder(tf.float32, shape=[None, img_height, img_width, channels]) 类似地,后面几个是图片尺寸的参数,第一个参数为None,表示batch size的大小。