Update to test for scale invariance

This commit is contained in:
Michael Oliver
2017-02-22 15:04:54 -08:00
committed by GitHub
parent 4dc4821ff7
commit 8141f9ee22
+1 -1
View File
@@ -55,7 +55,7 @@ def test_cosinedense():
model.add(core.CosineDense(1, bias=False, input_shape=(20,)))
model.compile(loss='mse', optimizer='rmsprop')
W = model.get_weights()
W[0] = -X.T
W[0] = -2*X.T
model.set_weights(W)
out = model.predict(X)
assert_allclose(out, -np.ones((1, 1), dtype=K.floatx()), atol=1e-5)