提交 a31fc8e7 authored 作者: Iulian Vlad Serban's avatar Iulian Vlad Serban

Fixed flake8 errors.

上级 8d6ff922
...@@ -3411,7 +3411,7 @@ def local_rebroadcast_lift(node): ...@@ -3411,7 +3411,7 @@ def local_rebroadcast_lift(node):
# and input (after elemwise operation) to new output, because an # and input (after elemwise operation) to new output, because an
# error in the new graph could have been caused by either of the # error in the new graph could have been caused by either of the
# two ops. # two ops.
copy_stack_trace(node.outputs+node.inputs, rval) copy_stack_trace(node.outputs + node.inputs, rval)
return rval return rval
if inode and isinstance(inode.op, T.Rebroadcast): if inode and isinstance(inode.op, T.Rebroadcast):
...@@ -3427,7 +3427,7 @@ def local_rebroadcast_lift(node): ...@@ -3427,7 +3427,7 @@ def local_rebroadcast_lift(node):
# and from previous input (after first rebroadcast op) because an error in # and from previous input (after first rebroadcast op) because an error in
# the new graph could have been caused by either of the two # the new graph could have been caused by either of the two
# rebroadcast ops. # rebroadcast ops.
copy_stack_trace(node.outputs+node.inputs, rval) copy_stack_trace(node.outputs + node.inputs, rval)
return rval return rval
...@@ -3633,7 +3633,7 @@ def local_useless_switch(node): ...@@ -3633,7 +3633,7 @@ def local_useless_switch(node):
ret = T.fill(cond, node.inputs[1]) ret = T.fill(cond, node.inputs[1])
# Copy over stacktrace from switch output and correct branch # Copy over stacktrace from switch output and correct branch
copy_stack_trace(node.outputs+node.inputs[1], ret) copy_stack_trace(node.outputs + node.inputs[1], ret)
return [ret] return [ret]
# This case happens with scan. # This case happens with scan.
...@@ -3709,7 +3709,7 @@ def local_mul_switch_sink(node): ...@@ -3709,7 +3709,7 @@ def local_mul_switch_sink(node):
# elementwise multiplication op and previous switch op, # elementwise multiplication op and previous switch op,
# because an error in this part can be caused by either # because an error in this part can be caused by either
# of the two previous ops. # of the two previous ops.
copy_stack_trace(node.outputs+switch.outputs, fct) copy_stack_trace(node.outputs + switch.outputs, fct)
return fct return fct
except NotScalarConstantError: except NotScalarConstantError:
pass pass
...@@ -3733,7 +3733,7 @@ def local_mul_switch_sink(node): ...@@ -3733,7 +3733,7 @@ def local_mul_switch_sink(node):
# elementwise multiplication op and previous switch op, # elementwise multiplication op and previous switch op,
# because an error in this part can be caused by either # because an error in this part can be caused by either
# of the two previous ops. # of the two previous ops.
copy_stack_trace(node.outputs+switch.outputs, fct) copy_stack_trace(node.outputs + switch.outputs, fct)
return fct return fct
except NotScalarConstantError: except NotScalarConstantError:
pass pass
...@@ -3777,7 +3777,7 @@ def local_div_switch_sink(node): ...@@ -3777,7 +3777,7 @@ def local_div_switch_sink(node):
# elementwise division op and previous switch op, # elementwise division op and previous switch op,
# because an error in this part can be caused by either # because an error in this part can be caused by either
# of the two previous ops. # of the two previous ops.
copy_stack_trace(node.outputs+switch.outputs, fct) copy_stack_trace(node.outputs + switch.outputs, fct)
return fct return fct
except NotScalarConstantError: except NotScalarConstantError:
pass pass
...@@ -3799,7 +3799,7 @@ def local_div_switch_sink(node): ...@@ -3799,7 +3799,7 @@ def local_div_switch_sink(node):
# elementwise division op and previous switch op, # elementwise division op and previous switch op,
# because an error in this part can be caused by either # because an error in this part can be caused by either
# of the two previous ops. # of the two previous ops.
copy_stack_trace(node.outputs+switch.outputs, fct) copy_stack_trace(node.outputs + switch.outputs, fct)
return fct return fct
except NotScalarConstantError: except NotScalarConstantError:
pass pass
...@@ -3843,7 +3843,7 @@ def local_useless_tile(node): ...@@ -3843,7 +3843,7 @@ def local_useless_tile(node):
ret = node.inputs[0].dimshuffle(broad) ret = node.inputs[0].dimshuffle(broad)
# Copy over stacktrace from previous output node, # Copy over stacktrace from previous output node,
# and from node before tiling operation. # and from node before tiling operation.
copy_stack_trace(node.outputs+node.inputs[0], ret) copy_stack_trace(node.outputs + node.inputs[0], ret)
return [ret] return [ret]
except ValueError: except ValueError:
return return
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论