Skip to content

Commit ca8b858

Browse files
authored
Fix the issue of disordered loading cifar data (#37272) (#37528)
1 parent c8429d3 commit ca8b858

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/paddle/vision/datasets/cifar.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ def _load_data(self):
140140
names = (each_item.name for each_item in f
141141
if self.flag in each_item.name)
142142

143+
names = sorted(list(names))
144+
143145
for name in names:
144146
batch = pickle.load(f.extractfile(name), encoding='bytes')
145147

0 commit comments

Comments
 (0)