From d1a1fafc4c933e51341004b83f225d786c3fed49 Mon Sep 17 00:00:00 2001 From: peizhilin Date: Fri, 16 Nov 2018 11:21:29 +0800 Subject: [PATCH] code style --- paddle/fluid/platform/cpu_helper.cc | 2 +- python/paddle/fluid/parallel_executor.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/platform/cpu_helper.cc b/paddle/fluid/platform/cpu_helper.cc index 4e52e8ff00c..bd6aedb3ac7 100644 --- a/paddle/fluid/platform/cpu_helper.cc +++ b/paddle/fluid/platform/cpu_helper.cc @@ -29,7 +29,7 @@ namespace platform { void SetNumThreads(int num_threads) { #ifdef PADDLE_USE_OPENBLAS - // windows has no support for openblas multi-thread +// windows has no support for openblas multi-thread #ifdef _WIN32 if (num_threads > 1) { num_threads = 1; diff --git a/python/paddle/fluid/parallel_executor.py b/python/paddle/fluid/parallel_executor.py index 33f6df67a42..0d53f53a9ef 100644 --- a/python/paddle/fluid/parallel_executor.py +++ b/python/paddle/fluid/parallel_executor.py @@ -29,7 +29,6 @@ if os.name != 'nt': ExecutionStrategy = core.ParallelExecutor.ExecutionStrategy BuildStrategy = core.ParallelExecutor.BuildStrategy - class ParallelExecutor(object): """ ParallelExecutor is designed for data parallelism, which focuses on distributing @@ -161,7 +160,8 @@ if os.name != 'nt': for p in main.global_block().iter_parameters() if not p.stop_gradient ]), - set(cpt.to_text(var) for var in self.persistable_vars), main.desc, + set(cpt.to_text(var) + for var in self.persistable_vars), main.desc, cpt.to_text(loss_name) if loss_name else six.u(''), scope, local_scopes, exec_strategy, build_strategy, num_trainers, trainer_id) -- GitLab