提交 5d305070 编写于 作者: Q qiaolongfei

parallel-do should not merge the gradient of parameter witch set stop_gradient=True

上级 f0548679
...@@ -294,7 +294,8 @@ class ParallelDo(object): ...@@ -294,7 +294,8 @@ class ParallelDo(object):
params = list(set(params)) params = list(set(params))
return [parent_block.var(name) for name in params] param_list = [parent_block.var(name) for name in params]
return filter(lambda param: param.stop_gradient is False, param_list)
def complete_op(self): def complete_op(self):
main_program = self.helper.main_program main_program = self.helper.main_program
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册