提交 23447cd5 编写于 作者: M minqiyang

Fix parallel_executor_fetch_feed issue

上级 5d4238cd
......@@ -116,8 +116,8 @@ def reader_creator(data_file,
for file in open(file_list):
file = file.strip()
batch = None
with open(file, 'r') as f:
batch = pickle.load(f)
with open(file, 'rb') as f:
batch = pickle.loads(f.read())
data = batch['data']
labels = batch['label']
for sample, label in zip(data, batch['label']):
......
......@@ -29,6 +29,7 @@ import os
import unittest
import numpy as np
import paddle.reader.creator
import six
class TestNumpyArray(unittest.TestCase):
......@@ -37,7 +38,7 @@ class TestNumpyArray(unittest.TestCase):
x = np.array(l, np.int32)
reader = paddle.reader.creator.np_array(x)
for idx, e in enumerate(reader()):
self.assertItemsEqual(e, l[idx])
six.assertCountEqual(e, l[idx])
class TestTextFile(unittest.TestCase):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册