提交 77842662 authored 作者: Frederic Bastien's avatar Frederic Bastien

flake8

上级 2dc64c84
...@@ -7490,20 +7490,20 @@ def local_useless_composite(node): ...@@ -7490,20 +7490,20 @@ def local_useless_composite(node):
# Although the ops ConsiderConstant, ZeroGrad and DisconnectedGrad # Although the ops ConsiderConstant, ZeroGrad and DisconnectedGrad
# just returns the input, it should be removed from the graph to # just returns the input, it should be removed from the graph to
# make sure all possible optimizations can be applied. # make sure all possible optimizations can be applied.
for opt, name in [(gof.OpRemove(theano.gradient.consider_constant_), for o, name in [(gof.OpRemove(theano.gradient.consider_constant_),
"remove_consider_constant"), "remove_consider_constant"),
(gof.OpRemove(theano.gradient.zero_grad_), (gof.OpRemove(theano.gradient.zero_grad_),
'remove_zero_grad'), 'remove_zero_grad'),
(gof.OpRemove(theano.gradient.disconnected_grad_), (gof.OpRemove(theano.gradient.disconnected_grad_),
'remove_disconnected_grad'), 'remove_disconnected_grad'),
(gof.OpRemove(theano.gradient.undefined_grad_), (gof.OpRemove(theano.gradient.undefined_grad_),
'remove_undefined_grad'), 'remove_undefined_grad'),
(gof.OpRemove(theano.gradient.GradClip), (gof.OpRemove(theano.gradient.GradClip),
'remove_grad_clip'), 'remove_grad_clip'),
(gof.OpRemove(theano.gradient.GradScale), (gof.OpRemove(theano.gradient.GradScale),
'remove_grad_scale')]: 'remove_grad_scale')]:
register_canonicalize(opt, 'fast_compile', 'fast_run', name=name) register_canonicalize(o, 'fast_compile', 'fast_run', name=name)
register_useless(opt, 'fast_compile', 'fast_run', name=name) register_useless(o, 'fast_compile', 'fast_run', name=name)
@register_useless @register_useless
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论