提交 918091fb authored 作者: Frederic Bastien's avatar Frederic Bastien

Correctly get the type_num and only print it with high verbosity

上级 e52ac5eb
...@@ -158,8 +158,9 @@ def raise_with_op(node, thunk=None, exc_info=None, storage_map=None): ...@@ -158,8 +158,9 @@ def raise_with_op(node, thunk=None, exc_info=None, storage_map=None):
"\nInputs strides: %s" % strides + "\nInputs strides: %s" % strides +
"\nInputs values: %s" % scalar_values) "\nInputs values: %s" % scalar_values)
detailed_err_msg += "\nInputs variables: %s" % str(node.inputs) detailed_err_msg += "\nInputs variables: %s" % str(node.inputs)
if theano.config.exception_verbosity == 'high':
detailed_err_msg += "\nInputs type_num: %s" % str( detailed_err_msg += "\nInputs type_num: %s" % str(
[getattr(getattr(i, 'dtype', ''), 'num', '') for i in node.inputs]) [getattr(getattr(i[0], 'dtype', ''), 'num', '') for i in thunk.inputs])
if hasattr(node.op, '__input_name__'): if hasattr(node.op, '__input_name__'):
detailed_err_msg += "\nInputs name: %s\n" % str(node.op.__input_name__) detailed_err_msg += "\nInputs name: %s\n" % str(node.op.__input_name__)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论