提交 20c9c1ec authored 作者: Caglar's avatar Caglar

fixed the test.

上级 83d734a2
......@@ -112,26 +112,27 @@ def debugprint(obj, depth=-1, print_type=False,
debugmode.debugprint(r, depth=depth, done=done, print_type=print_type,
file=_file, order=order, ids=ids,
scan_ops=scan_ops, stop_on_name=stop_on_name)
new_prefix = ' >'
new_prefix_child = ' >'
print >> file, "\nInner of the scan. "
for s in scan_ops:
debugmode.debugprint(s, depth=depth, done=done, print_type=print_type,
file=_file, ids=ids,
scan_ops=scan_ops, stop_on_name=stop_on_name)
if hasattr(s.owner, 'op') and isinstance(s.owner.op, theano.scan_module.scan_op.Scan):
for idx, i in enumerate(s.owner.op.outputs):
if hasattr(i, 'owner') and hasattr(i.owner, 'op'):
if isinstance(i.owner.op, theano.scan_module.scan_op.Scan):
scan_ops.append(i)
debugmode.debugprint(r=i, prefix=new_prefix, depth=depth, done=done,
print_type=print_type, file=file,
ids=ids, stop_on_name=stop_on_name,
prefix_child=new_prefix_child, scan_ops=scan_ops)
if len(scan_ops) > 0:
print >> file, "\n"
new_prefix = ' >'
new_prefix_child = ' >'
print >> file, "Inner of the scan."
for s in scan_ops:
debugmode.debugprint(s, depth=depth, done=done, print_type=print_type,
file=_file, ids=ids,
scan_ops=scan_ops, stop_on_name=stop_on_name)
if hasattr(s.owner, 'op') and isinstance(s.owner.op, theano.scan_module.scan_op.Scan):
for idx, i in enumerate(s.owner.op.outputs):
if hasattr(i, 'owner') and hasattr(i.owner, 'op'):
if isinstance(i.owner.op, theano.scan_module.scan_op.Scan):
scan_ops.append(i)
debugmode.debugprint(r=i, prefix=new_prefix, depth=depth, done=done,
print_type=print_type, file=file,
ids=ids, stop_on_name=stop_on_name,
prefix_child=new_prefix_child, scan_ops=scan_ops)
if file is _file:
return file
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论