提交 e05f4dfb 编写于 作者: Q qiaolongfei

add some comment

上级 7907b6a9
...@@ -370,6 +370,8 @@ class DistributeTranspiler: ...@@ -370,6 +370,8 @@ class DistributeTranspiler:
else: else:
recv_inputs.append(single_trainer_var) recv_inputs.append(single_trainer_var)
# step 3
# each optimization op will has a optimize block
optimize_block = None optimize_block = None
# step 4 # step 4
...@@ -433,6 +435,7 @@ class DistributeTranspiler: ...@@ -433,6 +435,7 @@ class DistributeTranspiler:
for idx, opt_op in enumerate(opt_op_on_pserver): for idx, opt_op in enumerate(opt_op_on_pserver):
per_opt_block = pserver_program.create_block(pre_block_idx) per_opt_block = pserver_program.create_block(pre_block_idx)
if optimize_block is None: if optimize_block is None:
# first optimize block
optimize_block = per_opt_block optimize_block = per_opt_block
for _, op in enumerate(self.optimize_ops): for _, op in enumerate(self.optimize_ops):
# optimizer is connected to itself # optimizer is connected to itself
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册