提交 e821c2aa authored 作者: Ian Goodfellow's avatar Ian Goodfellow

modified error message to include name of function experiencing the error

上级 9c4c58ad
...@@ -520,8 +520,14 @@ class Function(object): ...@@ -520,8 +520,14 @@ class Function(object):
allow_downcast=s.allow_downcast) allow_downcast=s.allow_downcast)
except Exception, e: except Exception, e:
e.args = tuple(list(e.args)+["Bad input argument at index %d" % i]) function_name="theano function"
if self.name:
function_name += 'with name "'+self.name+'" '
#end if
e.args = tuple(list(e.args)+["Bad input argument to "+function_name+" at index %d" % i])
raise raise
#end except
#end if
s.provided += 1 s.provided += 1
i+=1 i+=1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论