openai/glow

A bug in get_data.py

LeeDoYup opened this issue · 0 comments

I tried to use MS-COCO dataset for training.
After i serialize the MS-COCO image using

img = tf.gfile.FastGFile(img_path, 'rb').read()
or
img = open(img_path, 'rb').read()

and save tfrecords,

i always meets an error, the shape of decoded image is not corresponded to its original shape.

When i change this tf.decode_raw into tf.io.decode_image i solve the problem.

img = tf.decode_raw(data, tf.uint8)

I manually check that bytes files have smaller size than the original size (hxwxc)
What is the reason???