bfee9da317089ca0bfbe7e393933d586f1f329ee,examples/linear_bow.py,,main,#,17

Before Change


def main():
    train, dev = datasets.imdb()
    train = train[:5000]
    dev = dev[:5000]
    train_X, train_y = zip(*train)
    dev_X, dev_y = zip(*dev)
    model = LinearModel(2)
    train_y = to_categorical(train_y, nb_classes=2)

After Change


               for doc in nlp.pipe(train_X)]
    dev_X = [model.ops.asarray([tok.orth for tok in doc], dtype="uint64")
               for doc in nlp.pipe(dev_X)]
    dev_X = preprocess(model.ops, dev_X)
    with model.begin_training(train_X, train_y, L2=1e-6) as (trainer, optimizer):
        trainer.dropout = 0.0
        trainer.batch_size = 512
        trainer.nb_epoch = 3
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: explosion/thinc
Commit Name: bfee9da317089ca0bfbe7e393933d586f1f329ee
Time: 2017-03-12
Author: honnibal+gh@gmail.com
File Name: examples/linear_bow.py
Class Name:
Method Name: main


Project Name: jhfjhfj1/autokeras
Commit Name: b1bfd16945a658d02847209e46a2ba8d72b456e1
Time: 2019-07-01
Author: jhfjhfj1@gmail.com
File Name: autokeras/auto/auto_model.py
Class Name: GraphAutoModel
Method Name: fit