From 8551e07abc75a6074bdedbc65b74ffd822eb4a60 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Sun, 30 Sep 2018 14:53:46 +0800 Subject: [PATCH] Fix flowers data read in python3 test=develop --- python/paddle/dataset/flowers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/dataset/flowers.py b/python/paddle/dataset/flowers.py index 0d4e7f1ee46..4b4415397ff 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 -- GitLab