ce0325cb72000af404c2c0b4c3ef1644a66bc0e4,examples/mnist.py,,get_new_model,#Any#Any#,76

Before Change


    new_model.tau = model.tau
    train_data = train_data + train_data
    random.shuffle(train_data)
    acc = new_model.train(train_data, batch_size=100)
    return acc, new_model


def sequential_sgd(model, train_data, check_data, n_iter=5):

After Change


    random.shuffle(train_data)
    acc = 0.0
    for X, y in train_data:
        acc += new_model.update(Example.dense(model.nr_class, X, y))
    return acc / len(train_data), new_model


def sequential_sgd(model, train_data, check_data, n_iter=5):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: explosion/thinc
Commit Name: ce0325cb72000af404c2c0b4c3ef1644a66bc0e4
Time: 2016-08-23
Author: honnibal+gh@gmail.com
File Name: examples/mnist.py
Class Name:
Method Name: get_new_model


Project Name: dmlc/dgl
Commit Name: 189c2c0907cdff54f733299a93360ddfcff4ccb7
Time: 2019-09-07
Author: mufeili1996@gmail.com
File Name: examples/pytorch/model_zoo/chem/property_prediction/regression.py
Class Name:
Method Name:


Project Name: explosion/thinc
Commit Name: ce0325cb72000af404c2c0b4c3ef1644a66bc0e4
Time: 2016-08-23
Author: honnibal+gh@gmail.com
File Name: examples/mnist.py
Class Name:
Method Name: sequential_sgd