tf.image.decode_jpeg(img).shape = (?,?,?)
img_path = r'path/to/image'
img_raw_data = tf.gfile.FastGFile(img_path,'rb').read()
img_data = tf.image.decode_jpeg(img_raw_data)
with tf.Session() as sess:
shape = sess.run(image_data).shape
if you use the shape = img_data.shape .
it will return bug
shape =(?,?,?)