diff --git a/python/paddle/dataset/flowers.py b/python/paddle/dataset/flowers.py index 0d4e7f1ee46ff97912d010cdb268cc4898d99f58..4b4415397ff794e15d11fe32a0b3a89a858f6f2a 100644 --- a/python/paddle/dataset/flowers.py +++ b/python/paddle/dataset/flowers.py @@ -126,9 +126,9 @@ def reader_creator(data_file, batch = pickle.load(f) else: batch = pickle.load(f, encoding='bytes') - data = batch['data'] - labels = batch['label'] - for sample, label in zip(data, batch['label']): + data = batch[six.b('data')] + labels = batch[six.b('label')] + for sample, label in zip(data, batch[six.b('label')]): yield sample, int(label) - 1 if not cycle: break