From e05f4dfb491dff2508baec4bc442ec7a355c7c97 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Sun, 22 Apr 2018 21:47:33 +0800 Subject: [PATCH] add some comment --- python/paddle/fluid/distribute_transpiler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/paddle/fluid/distribute_transpiler.py b/python/paddle/fluid/distribute_transpiler.py index d0b36fa90a5..9565e6f4fd4 100644 --- a/python/paddle/fluid/distribute_transpiler.py +++ b/python/paddle/fluid/distribute_transpiler.py @@ -370,6 +370,8 @@ class DistributeTranspiler: else: recv_inputs.append(single_trainer_var) + # step 3 + # each optimization op will has a optimize block optimize_block = None # step 4 @@ -433,6 +435,7 @@ class DistributeTranspiler: for idx, opt_op in enumerate(opt_op_on_pserver): per_opt_block = pserver_program.create_block(pre_block_idx) if optimize_block is None: + # first optimize block optimize_block = per_opt_block for _, op in enumerate(self.optimize_ops): # optimizer is connected to itself -- GitLab