提交 a30feb9c authored 作者: Frederic's avatar Frederic

Show more values in error message.

上级 aa892a7e
...@@ -126,10 +126,10 @@ def raise_with_op(node, thunk=None, exc_info=None): ...@@ -126,10 +126,10 @@ def raise_with_op(node, thunk=None, exc_info=None):
for ipt in thunk.inputs] for ipt in thunk.inputs]
scalar_values = [] scalar_values = []
for ipt in thunk.inputs: for ipt in thunk.inputs:
if getattr(ipt[0], "size", -1) == 1: if getattr(ipt[0], "size", -1) <= 5:
scalar_values.append(ipt[0]) scalar_values.append(ipt[0])
else: else:
scalar_values.append("not scalar") scalar_values.append("not shown")
else: else:
shapes = "The thunk don't have an inputs attributes." shapes = "The thunk don't have an inputs attributes."
strides = "So we can't access the strides of inputs values" strides = "So we can't access the strides of inputs values"
...@@ -137,7 +137,7 @@ def raise_with_op(node, thunk=None, exc_info=None): ...@@ -137,7 +137,7 @@ def raise_with_op(node, thunk=None, exc_info=None):
detailed_err_msg += ("Inputs shapes: %s" % shapes + detailed_err_msg += ("Inputs shapes: %s" % shapes +
"\nInputs strides: %s" % strides + "\nInputs strides: %s" % strides +
"\nInputs scalar values: %s\n" % scalar_values) "\nInputs values: %s\n" % scalar_values)
else: else:
hints.append( hints.append(
"HINT: Use another linker then the c linker to" "HINT: Use another linker then the c linker to"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论