提交 c839e1b9 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make the add check faster and flake8 format this part.

上级 c6bfe4d4
......@@ -701,9 +701,9 @@ class PushOutScanOutput(gof.Optimizer):
for nd in local_fgraph_topo:
if (isinstance(nd.op, theano.tensor.elemwise.Elemwise) and
nd.op.scalar_op == scalar.add and
nd.out in args.inner_out_sit_sot and
self.inner_sitsot_only_last_step_used(nd.out, args)):
isinstance(nd.op.scalar_op, scalar.Add) and
nd.out in args.inner_out_sit_sot and
self.inner_sitsot_only_last_step_used(nd.out, args)):
# Ensure that one of the input to the add is the output of
# the add from a previous iteration of the inner function
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论