提交 444fa022 authored 作者: Frederic Bastien's avatar Frederic Bastien

Add the user stack trace printing in nanguardmode

上级 589b5926
...@@ -264,6 +264,9 @@ class NanGuardMode(Mode): ...@@ -264,6 +264,9 @@ class NanGuardMode(Mode):
else: else:
print("NanGuardMode found an error in an input of the " print("NanGuardMode found an error in an input of the "
"graph.", file=sio) "graph.", file=sio)
# Add the stack trace
print(theano.gof.utils.get_variable_trace_string(
nd.outputs[0]), file=sio)
msg = sio.getvalue() msg = sio.getvalue()
if config.NanGuardMode.action == 'raise': if config.NanGuardMode.action == 'raise':
raise AssertionError(msg) raise AssertionError(msg)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论