e074a049205829feb52c7d90f2011519327e56f3,examples/reuters_mlp.py,,,#,22

Before Change


acc = np_utils.accuracy(classes, y_test)
print("Test accuracy:", acc)

model.save("testsave.m")


After Change


// import cPickle
// model = cPickle.load(open("testsave.m.pkl"))

for v in range(3):
    for sa in [True, False]:
        for vs in [0, 0.1]:
            print("="*40)
            print("v:%d, sa:%r, vs:%f" % (v, sa, vs))
            print("Training...")
            model.fit(X_train, Y_train, nb_epoch=2, batch_size=batch_size, verbose=v, show_accuracy=sa, validation_split=vs)
            score = model.evaluate(X_test, Y_test, batch_size=batch_size, verbose=v, show_accuracy=sa)
            print("Test score:", score)

            classes = model.predict_classes(X_test, batch_size=batch_size, verbose=v)
            acc = np_utils.accuracy(classes, y_test)
            print("Test accuracy:", acc)

// model.save("testsave.m")


Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: e074a049205829feb52c7d90f2011519327e56f3
Time: 2015-04-19
Author: francois.chollet@gmail.com
File Name: examples/reuters_mlp.py
Class Name:
Method Name:


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: ab5f6d6986fc4f1eebc0b5b3c8972daba029954b
Time: 2018-01-18
Author: max.lapan@gmail.com
File Name: ch13/adhoc/wob_clicks.py
Class Name:
Method Name:


Project Name: calico/basenji
Commit Name: d6cfffd01a2a3129739c6e76f9d966287b20b7c5
Time: 2019-04-12
Author: drk@calicolabs.com
File Name: bin/basenji_predict.py
Class Name:
Method Name: main