提交 1ef5f2c3 编写于 作者: M minqiyang

Make flowers reader and parallel_executor more efficient

上级 e398348e
......@@ -120,7 +120,7 @@ def reader_creator(data_file,
file = file.strip()
batch = None
with open(file, 'rb') as f:
batch = pickle.loads(f.read())
batch = pickle.load(f)
data = batch['data']
labels = batch['label']
for sample, label in zip(data, batch['label']):
......
......@@ -273,7 +273,7 @@ class ParallelExecutor(object):
self.executor.feed_tensors_into_local_scopes(res)
fetch_var_name = '@FETCHED_VAR_NAME@'
self.executor.run(cpt.to_text(fetch_list), cpt.to_text(fetch_var_name))
self.executor.run(fetch_list, fetch_var_name)
arr = self.scope.find_var(fetch_var_name).get_lod_tensor_array()
if self.is_dist:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册