提交 b29d7cee authored 作者: Amjad Almahairi's avatar Amjad Almahairi

flake8 fixes

上级 7d737cca
...@@ -157,23 +157,27 @@ N.B.: ...@@ -157,23 +157,27 @@ N.B.:
print("Inner graphs of the scan ops:", file=_file) print("Inner graphs of the scan ops:", file=_file)
for s in scan_ops: for s in scan_ops:
# prepare a dict which maps the scan op's inner inputs to its outer inputs. # prepare a dict which maps the scan op's inner inputs
# to its outer inputs.
if hasattr(s.owner.op, 'fn'): if hasattr(s.owner.op, 'fn'):
# If the op was compiled, print the optimized version. # If the op was compiled, print the optimized version.
inner_inputs = s.owner.op.fn.maker.fgraph.inputs inner_inputs = s.owner.op.fn.maker.fgraph.inputs
else: else:
inner_inputs = s.owner.op.inputs inner_inputs = s.owner.op.inputs
outer_inputs = s.owner.inputs outer_inputs = s.owner.inputs
inner_to_outer_inputs = dict([(inner_inputs[i],outer_inputs[o]) inner_to_outer_inputs = \
for i,o in enumerate( dict([(inner_inputs[i], outer_inputs[o])
for i, o in enumerate(
s.owner.op.get_outer_iidx_from_inner_iidx_seq())]) s.owner.op.get_outer_iidx_from_inner_iidx_seq())])
print("", file=_file) print("", file=_file)
debugmode.debugprint(s, depth=depth, done=done, debugmode.debugprint(s, depth=depth, done=done,
print_type=print_type, print_type=print_type,
file=_file, ids=ids, file=_file, ids=ids,
scan_ops=scan_ops, stop_on_name=stop_on_name, scan_ops=scan_ops,
scan_inner_to_outer_inputs=inner_to_outer_inputs) stop_on_name=stop_on_name,
scan_inner_to_outer_inputs=
inner_to_outer_inputs)
if hasattr(s.owner.op, 'fn'): if hasattr(s.owner.op, 'fn'):
# If the op was compiled, print the optimized version. # If the op was compiled, print the optimized version.
outputs = s.owner.op.fn.maker.fgraph.outputs outputs = s.owner.op.fn.maker.fgraph.outputs
...@@ -191,7 +195,8 @@ N.B.: ...@@ -191,7 +195,8 @@ N.B.:
ids=ids, stop_on_name=stop_on_name, ids=ids, stop_on_name=stop_on_name,
prefix_child=new_prefix_child, prefix_child=new_prefix_child,
scan_ops=scan_ops, scan_ops=scan_ops,
scan_inner_to_outer_inputs=inner_to_outer_inputs) scan_inner_to_outer_inputs=
inner_to_outer_inputs)
if file is _file: if file is _file:
return file return file
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论