Tensorflow读取jpg图像常用步骤:
filename = '/data/test_image.jpg'
image_data = tf.gfile.FastGFile(filename, 'rb').read()
decode_jpeg_data = tf.placeholder(dtype=tf.string)
decode_jpeg = tf.image.decode_jpeg(decode_jpeg_data, channels=3)
image = sess.run(decode_jpeg, feed_dict={decode_jpeg_data: image_data})