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

Fixed minor bug.

上级 b7001383
......@@ -331,7 +331,7 @@ class FunctionGraph(utils.object2):
# if there is no path then r isn't really a graph input so we shouldn't be running error
# handler code in the first place
assert path is not None
tr = getattr(r.tag, 'trace', None)
tr = getattr(r.tag, 'trace', [])
detailed_err_msg = ""
if len(tr) > 0:
detailed_err_msg += "\nBacktrace when the variable is created:\n"
......
......@@ -157,7 +157,7 @@ def raise_with_op(node, thunk=None, exc_info=None, storage_map=None):
" have the inputs shapes and strides printed.")
# Print node backtraces
tr = getattr(node.outputs[0].tag, 'trace', None)
tr = getattr(node.outputs[0].tag, 'trace', [])
if len(tr) > 0:
detailed_err_msg += "\nBacktrace when the node is created:\n"
......
......@@ -458,7 +458,7 @@ class PureOp(object):
detailed_err_msg = (
"For compute_test_value, one input test value does not"
" have the requested type.\n")
tr = getattr(v.tag, 'trace', None)
tr = getattr(v.tag, 'trace', [])
if len(tr) > 0:
detailed_err_msg += (
" \nBacktrace when that variable is created:\n")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论