534f6b7975dcd334f6d68eef14598d75c79e7921,tests/test_model_saving.py,,test_sequential_model_saving_2,#,51

Before Change



    // test that new updates are the same with both models
    x = np.random.random((1, 3))
    y = np.random.random((1, 3, 3))
    model.train_on_batch(x, y)
    new_model.train_on_batch(x, y)
    out = model.predict(x)
    out2 = new_model.predict(x)

After Change


    fname = "tmp_" + str(np.random.randint(10000)) + ".h5"
    save_model(model, fname)

    model = load_model(fname,
                       custom_objects={"custom_opt": custom_opt,
                                       "custom_loss": custom_loss})
    os.remove(fname)

    out2 = model.predict(x)
    assert_allclose(out, out2, atol=1e-05)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: 534f6b7975dcd334f6d68eef14598d75c79e7921
Time: 2016-08-28
Author: francois.chollet@gmail.com
File Name: tests/test_model_saving.py
Class Name:
Method Name: test_sequential_model_saving_2


Project Name: analysiscenter/batchflow
Commit Name: fab8d83aa1d19d5e40383323a60666a886804c54
Time: 2019-08-16
Author: 7520522+a-arefina@users.noreply.github.com
File Name: batchflow/tests/rebatch_test.py
Class Name:
Method Name: test_rebatch


Project Name: IBM/AIF360
Commit Name: 555cc61146ae28d1ddd7e396f1afdc0a81a3d964
Time: 2020-02-19
Author: hoffman.sc@gmail.com
File Name: aif360/sklearn/tests/test_reweighing.py
Class Name:
Method Name: test_gridsearch