提交 89e37be9 authored 作者: Yoshua Bengio's avatar Yoshua Bengio

More explicit error message

上级 7bb31a2a
......@@ -136,7 +136,7 @@ class Env(utils.object2):
if hasattr(r, 'env') and r.env is not self:
raise Exception("%s is already owned by another env" % r)
if r.owner is None and not isinstance(r, graph.Value) and r not in self.inputs:
raise TypeError("Undeclared input", r)
raise TypeError("An input of the graph was not provided and not given a value", r)
for node in new_nodes:
self.__setup_node__(node)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论