tensorflow / tensor2tensor

Library of deep learning models and datasets designed to make deep learning more accessible and accelerate ML research.
Apache License 2.0
15.5k stars 3.49k forks source link

*bug* ImageCelebA generator expects non-binary raw image data? #760

Open cwbeitel opened 6 years ago

cwbeitel commented 6 years ago

Description

Stock celeba_problem.generate_data() fails with UnicodeDecodeError.

TensorFlow and tensor2tensor versions

tensor2tensor==1.6.1 tensorboard==1.8.0 tensorflow==1.8.0

Steps to reproduce and error log

See https://gist.github.com/cwbeitel/1cd9331dfb23d239a8f2ce692ee59055

cwbeitel commented 6 years ago

Similarly, for cifar10, https://gist.github.com/cwbeitel/3d694c9e8f75ae05543ae6498d7dfee2

cwbeitel commented 6 years ago

Both of these run to completion with Python 2.7 runtime.

Duplicate or related to https://github.com/tensorflow/tensor2tensor/issues/142, https://github.com/tensorflow/tensor2tensor/issues/102

Should use tf.gfile.Open in place of built-in Open?

cwbeitel commented 6 years ago

May just need to add "rb" in place of "r" when instantiating file object, e.g. here https://github.com/tensorflow/tensor2tensor/blob/ed9e3bdfd0292d4b6e5b1a1bf272146c8e2f5e9f/tensor2tensor/data_generators/celeba.py#L126