From 534f6b7975dcd334f6d68eef14598d75c79e7921 Mon Sep 17 00:00:00 2001 From: Francois Chollet Date: Sun, 28 Aug 2016 01:10:53 -0700 Subject: [PATCH] Remove flaky test --- tests/test_model_saving.py | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/tests/test_model_saving.py b/tests/test_model_saving.py index cf7a612c1..9b64e7411 100644 --- a/tests/test_model_saving.py +++ b/tests/test_model_saving.py @@ -15,41 +15,6 @@ from keras.models import save_model, load_model @keras_test def test_sequential_model_saving(): - model = Sequential() - model.add(Dense(2, input_dim=3)) - model.add(Dense(3)) - model.compile(loss='mse', optimizer='rmsprop', metrics=['acc']) - - x = np.random.random((1, 3)) - y = np.random.random((1, 3)) - model.train_on_batch(x, y) - - out = model.predict(x) - fname = 'tmp_' + str(np.random.randint(10000)) + '.h5' - save_model(model, fname) - - new_model = load_model(fname) - - out2 = new_model.predict(x) - assert_allclose(out, out2, atol=1e-05) - - # test that new updates are the same with both models - x = np.random.random((1, 3)) - y = np.random.random((1, 3)) - model.train_on_batch(x, y) - new_model.train_on_batch(x, y) - out = model.predict(x) - out2 = new_model.predict(x) - assert_allclose(out, out2, atol=1e-05) - - # test load_weights on model file - model.load_weights(fname) - os.remove(fname) - - -@keras_test -def test_sequential_model_saving_2(): - # test with funkier config model = Sequential() model.add(Dense(2, input_dim=3)) model.add(RepeatVector(3)) @@ -83,7 +48,7 @@ def test_sequential_model_saving_2(): @keras_test -def test_sequential_model_saving_3(): +def test_sequential_model_saving_2(): # test with custom optimizer, loss custom_opt = optimizers.rmsprop custom_loss = objectives.mse