Skip to content

Commit 8551e07

Browse files
committed
Fix flowers data read in python3
test=develop
1 parent 2f5a7cc commit 8551e07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/paddle/dataset/flowers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ def reader():
126126
batch = pickle.load(f)
127127
else:
128128
batch = pickle.load(f, encoding='bytes')
129-
data = batch['data']
130-
labels = batch['label']
131-
for sample, label in zip(data, batch['label']):
129+
data = batch[six.b('data')]
130+
labels = batch[six.b('label')]
131+
for sample, label in zip(data, batch[six.b('label')]):
132132
yield sample, int(label) - 1
133133
if not cycle:
134134
break

0 commit comments

Comments
 (0)