提交 dfdc95f2 authored 作者: Frederic Bastien's avatar Frederic Bastien

small change to test to help find the cause of the test failure.

上级 dce8d307
......@@ -61,9 +61,10 @@ def test_GpuCrossentropySoftmax1HotWithBiasDx():
out=classify(xx,yy,b_values,W_values)
gout=classify_gpu(xx,yy,b_values,W_values)
assert len(out)==len(gout)==3
assert numpy.allclose(out[0],gout[0])
assert numpy.allclose(out[1],gout[1])
assert numpy.allclose(out[2],gout[2],atol=2e-6)
assert numpy.allclose(out[2],gout[2],atol=3e-6),numpy.absolute(gout-out).max()
assert numpy.allclose(out[1],gout[1]),[(id,out[1][id],gout[1][id],val) for id,val in enumerate(out[1]-gout[1]) if val!=0]
def test_softmax_with_bias():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论