607635d2ce421d77eea96dc3eb9c9a592ac312bc,tests/test_model_saving.py,,test_sequential_model_saving,#,17

Before Change


    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)
    os.remove(fname)

After Change


    model.train_on_batch(x, y)

    out = model.predict(x)
    _, fname = tempfile.mkstemp(".h5")
    save_model(model, fname)

    new_model = load_model(fname)
    os.remove(fname)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 9

Instances


Project Name: keras-team/keras
Commit Name: 607635d2ce421d77eea96dc3eb9c9a592ac312bc
Time: 2016-09-06
Author: acordero@gmail.com
File Name: tests/test_model_saving.py
Class Name:
Method Name: test_sequential_model_saving


Project Name: keras-team/keras
Commit Name: 607635d2ce421d77eea96dc3eb9c9a592ac312bc
Time: 2016-09-06
Author: acordero@gmail.com
File Name: tests/test_model_saving.py
Class Name:
Method Name: test_sequential_model_saving_2


Project Name: keras-team/keras
Commit Name: 607635d2ce421d77eea96dc3eb9c9a592ac312bc
Time: 2016-09-06
Author: acordero@gmail.com
File Name: tests/test_model_saving.py
Class Name:
Method Name: test_fuctional_model_saving


Project Name: keras-team/keras
Commit Name: 607635d2ce421d77eea96dc3eb9c9a592ac312bc
Time: 2016-09-06
Author: acordero@gmail.com
File Name: tests/test_model_saving.py
Class Name:
Method Name: test_saving_right_after_compilation


Project Name: keras-team/keras
Commit Name: 607635d2ce421d77eea96dc3eb9c9a592ac312bc
Time: 2016-09-06
Author: acordero@gmail.com
File Name: tests/test_model_saving.py
Class Name:
Method Name: test_saving_without_compilation