File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -283,14 +283,6 @@ def get_pserver_program(self, endpoint):
283
283
orig_var_name = v .name [:suff_idx ]
284
284
else :
285
285
orig_var_name = v .name
286
- #TODO(panyx0718): Should this be put in the else block below? It's
287
- # only used there and it's called single_trainer_var.
288
- single_trainer_var = pserver_program .global_block ().create_var (
289
- name = orig_var_name ,
290
- persistable = True ,
291
- type = v .type ,
292
- dtype = v .dtype ,
293
- shape = v .shape )
294
286
if self .trainers > 1 :
295
287
for trainer_id in xrange (self .trainers ):
296
288
var = pserver_program .global_block ().create_var (
@@ -301,6 +293,12 @@ def get_pserver_program(self, endpoint):
301
293
shape = v .shape )
302
294
recv_inputs .append (var )
303
295
else :
296
+ single_trainer_var = pserver_program .global_block ().create_var (
297
+ name = orig_var_name ,
298
+ persistable = True ,
299
+ type = v .type ,
300
+ dtype = v .dtype ,
301
+ shape = v .shape )
304
302
recv_inputs .append (single_trainer_var )
305
303
306
304
# step3
@@ -825,8 +823,6 @@ def _get_lr_ops(self):
825
823
# make a union find struct by the ops in default_main_program
826
824
ufind = UnionFind (block .ops )
827
825
828
- # TODO(panyx0718): If lr_ops connects with other training
829
- # ops, could they be considered as lr_ops?
830
826
for op1 in block .ops :
831
827
for op2 in block .ops :
832
828
# NOTE: we need to skip all optimize ops, since it is connected
You can’t perform that action at this time.
0 commit comments