5ea0c27f524a3e684d9a2e6f012e30e6da2de8aa,scripts/bert/finetune_classifier.py,,test,#Any#Any#,334

Before Change


                    type_ids.as_in_context(ctx),
                    valid_length.astype("float32").as_in_context(ctx))
        values, indices = mx.nd.topk(out, k=1, ret_typ="both")
        value_list.extend(values.asnumpy().reshape(-1).tolist())
        index_list.extend(indices.asnumpy().reshape(-1).tolist())

    mx.nd.waitall()
    toc = time.time()

After Change


        if not task.class_labels:
            // regression task
            for result in out.asnumpy().reshape(-1).tolist():
                results.append("{:.3f}".format(result))
        else:
            // classification task
            indices = mx.nd.topk(out, k=1, ret_typ="indices", dtype="int32").asnumpy()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: dmlc/gluon-nlp
Commit Name: 5ea0c27f524a3e684d9a2e6f012e30e6da2de8aa
Time: 2019-06-18
Author: linhaibin.eric@gmail.com
File Name: scripts/bert/finetune_classifier.py
Class Name:
Method Name: test


Project Name: NervanaSystems/coach
Commit Name: 85afb86893ad241660b3ff7dc23fe5eb581a83ce
Time: 2018-02-21
Author: zach.dwiel@intel.com
File Name: architectures/tensorflow_components/general_network.py
Class Name: GeneralTensorFlowNetwork
Method Name: get_model


Project Name: tryolabs/luminoth
Commit Name: 5d9571462965fc0ed3fd9e88ce395de5a68e3527
Time: 2017-11-08
Author: javirey@gmail.com
File Name: luminoth/tools/cloud/gcloud.py
Class Name:
Method Name: train