提交 07ee83bf authored 作者: Ian Goodfellow's avatar Ian Goodfellow

changed an assert not to check for specific language of an exception,

the old exception message was annoyingly uninformative corrected mathematically inaccurate comment
上级 077bc706
......@@ -38,7 +38,7 @@ class test_grad_sources_inputs(unittest.TestCase):
self.fail()
def test_wrong_rval_len1(self):
"""Test that it is not ok to return the wrong number of gradients"""
"""Test that it is not ok to return the wrong number of gradient terms"""
class retNone(gof.op.Op):
def make_node(self, *inputs):
outputs = [theano.tensor.vector()]
......@@ -54,7 +54,6 @@ class test_grad_sources_inputs(unittest.TestCase):
try:
g = _grad_sources_inputs([(a2.out, 1)], None)
except ValueError, e:
self.assertTrue(e[0] is gradient._msg_badlen)
return
self.fail()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论