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

changed ValueError to AssertionError so test will show up as failing

rather than having an error
上级 4441b2d1
...@@ -415,7 +415,7 @@ class test_grad(unittest.TestCase): ...@@ -415,7 +415,7 @@ class test_grad(unittest.TestCase):
g_x, g_one = f(1, .5) g_x, g_one = f(1, .5)
if not np.allclose(g_x, g_one): if not np.allclose(g_x, g_one):
raise ValueError("Gradient using consider constant is " + str(g_x)\ raise AssertionError("Gradient using consider constant is " + str(g_x)\
+ " but gradient with respect to the same Constant is " + \ + " but gradient with respect to the same Constant is " + \
str(g_one)) str(g_one))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论