Make flowers reader and parallel_executor more efficient

revert-12469-sum_op_dim_fix
minqiyang 7 years ago
parent e398348e7e
commit 1ef5f2c3e8

@ -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:

Loading…
Cancel
Save