提交 c86faf41 authored 作者: David Warde-Farley's avatar David Warde-Farley

Minor PEP8 spacing.

上级 9c796571
...@@ -215,7 +215,6 @@ class IfElse(PureOp): ...@@ -215,7 +215,6 @@ class IfElse(PureOp):
if_false_op.make_node(*if_false).outputs) if_false_op.make_node(*if_false).outputs)
def make_thunk(self, node, storage_map, compute_map, no_recycling): def make_thunk(self, node, storage_map, compute_map, no_recycling):
outtypes = [out.type for out in node.outputs] outtypes = [out.type for out in node.outputs]
cond = node.inputs[0] cond = node.inputs[0]
ts = node.inputs[1:][:self.n_outs] ts = node.inputs[1:][:self.n_outs]
...@@ -396,6 +395,7 @@ acceptable_ops = (theano.tensor.basic.Dot, ...@@ -396,6 +395,7 @@ acceptable_ops = (theano.tensor.basic.Dot,
theano.tensor.elemwise.Elemwise, theano.tensor.elemwise.Elemwise,
theano.tensor.elemwise.DimShuffle) theano.tensor.elemwise.DimShuffle)
@gof.local_optimizer([None]) @gof.local_optimizer([None])
def ifelse_lift_single_if_through_acceptable_ops(main_node): def ifelse_lift_single_if_through_acceptable_ops(main_node):
"""This optimization lifts up certain ifelse instances. """This optimization lifts up certain ifelse instances.
...@@ -445,6 +445,7 @@ def ifelse_lift_single_if_through_acceptable_ops(main_node): ...@@ -445,6 +445,7 @@ def ifelse_lift_single_if_through_acceptable_ops(main_node):
nw_outs = [nw_outs] nw_outs = [nw_outs]
return nw_outs return nw_outs
@gof.local_optimizer([None]) @gof.local_optimizer([None])
def cond_merge_ifs_true(node): def cond_merge_ifs_true(node):
op = node.op op = node.op
...@@ -595,7 +596,6 @@ def cond_remove_identical(node): ...@@ -595,7 +596,6 @@ def cond_remove_identical(node):
return rval return rval
@gof.local_optimizer([None]) @gof.local_optimizer([None])
def cond_merge_random_op(main_node): def cond_merge_random_op(main_node):
if isinstance(main_node.op, IfElse): if isinstance(main_node.op, IfElse):
...@@ -682,7 +682,6 @@ pushout_equilibrium.register('ifelse_sameCondFalse_inside', ...@@ -682,7 +682,6 @@ pushout_equilibrium.register('ifelse_sameCondFalse_inside',
ignore_newtrees=True), ignore_newtrees=True),
'fast_run', 'ifelse') 'fast_run', 'ifelse')
ifelse_seqopt.register('ifelse_condPushOut_equilibrium', ifelse_seqopt.register('ifelse_condPushOut_equilibrium',
pushout_equilibrium, pushout_equilibrium,
1, 'fast_run', 'ifelse') 1, 'fast_run', 'ifelse')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论