softmax test

This commit is contained in:
wassname
2017-11-15 10:45:50 +08:00
parent d054c79bd6
commit 4e9a8c10b3
+1 -1
View File
@@ -10,7 +10,7 @@ def test_softmax():
y = softmax(x)
np.testing.assert_almost_equal(y.sum(), 1)
x = np.random.random([0, 1])
x = np.array([0, 1])
y = softmax(x)
assert y[0] < y[1]
assert (y > 0).all()