Skip to content

Commit

Permalink
fix test problem due to type casting
Browse files Browse the repository at this point in the history
  • Loading branch information
EderSantana committed Dec 5, 2015
1 parent b55f991 commit 614e48e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/keras/layers/test_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_layer_call(self):
F = K.function([X], [Y])

x = np.random.randn(nb_samples, input_dim).astype(K.floatx())
y = F([x])[0]
y = F([x])[0].astype(K.floatx())
assert_allclose(np.dot(x, W), y)

def test_sequential_call(self):
Expand All @@ -41,7 +41,7 @@ def test_sequential_call(self):
F = K.function([X], [Y])

x = np.random.randn(nb_samples, input_dim).astype(K.floatx())
y1 = F([x])[0]
y1 = F([x])[0].astype(K.floatx())
y2 = model.predict(x)
# results of __call__ should match model.predict
assert_allclose(y1, y2)
Expand Down

0 comments on commit 614e48e

Please sign in to comment.