2eb4c5f77bd8da9b1e23851b0acb84543e442953,python/baseline/pytorch/classify/model.py,WordClassifierModelBase,create,#Any#Any#Any#,27

Before Change


        model.pdrop = kwargs.get("pdrop", 0.5)
        model.embeddings = dict()
        model.embeddings["word"] = pytorch_embeddings(embeddings_set["word"], **kwargs)
        input_sz = model.embeddings["word"].get_dsz()
        if "char" in embeddings_set:
            model.embeddings["char"] = pytorch_embeddings(embeddings_set["char"],
                                                          DefaultType=PyTorchCharConvEmbeddings,

After Change


            elif "x" in embeddings:
                model.lengths_key = "x"

        if model.lengths_key is not None:
            // This allows user to short-hand the field to use
            if not model.lengths_key.endswith("_lengths"):
                model.lengths_key += "_lengths"
        input_sz = model._init_embed(embeddings)
        model.gpu = not bool(kwargs.get("nogpu", False))
        model.labels = labels
        model.log_softmax = nn.LogSoftmax(dim=1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: dpressel/mead-baseline
Commit Name: 2eb4c5f77bd8da9b1e23851b0acb84543e442953
Time: 2018-09-24
Author: dpressel@gmail.com
File Name: python/baseline/pytorch/classify/model.py
Class Name: WordClassifierModelBase
Method Name: create


Project Name: dpressel/mead-baseline
Commit Name: c41873db30416ae67506a24d691a54408b7c6e6f
Time: 2018-09-26
Author: dpressel@gmail.com
File Name: python/mead/tasks.py
Class Name: ClassifierTask
Method Name: _create_model


Project Name: gboeing/osmnx
Commit Name: 248fa57af17b42deec9c818eb83aa71e63d50354
Time: 2020-06-08
Author: boeing@usc.edu
File Name: osmnx/io.py
Class Name:
Method Name: _convert_edge_attr_types


Project Name: tensorflow/tensorflow
Commit Name: 448e080c752a1b5f54c422401b41e824b0274a91
Time: 2020-11-17
Author: crccw@google.com
File Name: tensorflow/python/distribute/multi_process_lib.py
Class Name:
Method Name: _set_spawn_exe_path