d63abb86304d5ceca8ec14109a4812258f9839ea,scripts/bert/finetune_classifier.py,,test,#Any#Any#,363

Before Change


        input_ids, valid_length, type_ids = seqs
        out = model(input_ids.as_in_context(ctx),
                    type_ids.as_in_context(ctx),
                    valid_length.astype("float32").as_in_context(ctx))
        if not task.class_labels:
            // regression task
            for result in out.asnumpy().reshape(-1).tolist():

After Change


    for _, seqs in enumerate(loader_test):
        input_ids, valid_length, segment_ids = seqs
        input_ids = input_ids.as_in_context(ctx)
        valid_length = valid_length.as_in_context(ctx).astype("float32")
        if use_roberta:
            out = model(input_ids, valid_length)
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dmlc/gluon-nlp
Commit Name: d63abb86304d5ceca8ec14109a4812258f9839ea
Time: 2019-09-24
Author: linhaibin.eric@gmail.com
File Name: scripts/bert/finetune_classifier.py
Class Name:
Method Name: test


Project Name: dmlc/dgl
Commit Name: 3a1392e6417ce966318b0ee1033249a2cfe06665
Time: 2019-05-06
Author: zhengda1936@gmail.com
File Name: examples/mxnet/sampling/gcn_ns_sc.py
Class Name:
Method Name: gcn_ns_train


Project Name: dmlc/gluon-nlp
Commit Name: d63abb86304d5ceca8ec14109a4812258f9839ea
Time: 2019-09-24
Author: linhaibin.eric@gmail.com
File Name: scripts/bert/finetune_classifier.py
Class Name:
Method Name: evaluate