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


// 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: 3

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: nipy/dipy
Commit Name: 27d10570af678e1059920c4ae895860dda11433c
Time: 2017-06-26
Author: garyfallidis@gmail.com
File Name: doc/examples/tracking_quick_start.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: