diff --git a/python/paddle/dataset/flowers.py b/python/paddle/dataset/flowers.py index 17c768424f190e92d97f03ff9907dc8db61de93e..aa73bbaf7024ec873d9e921205536f12e097ff32 100644 --- a/python/paddle/dataset/flowers.py +++ b/python/paddle/dataset/flowers.py @@ -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']): diff --git a/python/paddle/fluid/parallel_executor.py b/python/paddle/fluid/parallel_executor.py index ac87b12a1ce7fce274c79aa492c2acb8410798dd..a7765c9591f0bd653c08036c46a36131906a758f 100644 --- a/python/paddle/fluid/parallel_executor.py +++ b/python/paddle/fluid/parallel_executor.py @@ -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: