7e569f461b1638f3a7d0d2b825699745df876b68,tensornets/pretrained.py,,direct,#,76

Before Change


def direct(model_name, scope):
    if model_name.startswith("gen"):
        fun = load_nothing
        if "FasterRCNN" in model_name:
            if "vgg16" in scope.stem_name:
                fun = load_ref_faster_rcnn_vgg16_voc
            elif "zf" in scope.stem_name:
                fun = load_ref_faster_rcnn_zf_voc
        elif "TinyYOLOv2" in model_name:
            if "tinydarknet19" in scope.stem_name:
                fun = load_ref_tiny_yolo_v2_voc
        elif "YOLOv2" in model_name:
            if "darknet19" in scope.stem_name:
                fun = load_ref_yolo_v2_voc
    else:
        fun = __load_dict__[model_name]

    def _direct():

After Change



def direct(model_name, scope):
    if model_name.startswith("gen"):
        model_name = model_name[3:].lower()
        stem_name = scope.stem.model_name
        try:
            fun = __gen_load_dict__[model_name][stem_name]
        except KeyError:
            fun = load_nothing
            warnings.warn("Random initialization will be performed because "
                          "the pre-trained weights for " + model_name +
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: taehoonlee/tensornets
Commit Name: 7e569f461b1638f3a7d0d2b825699745df876b68
Time: 2018-04-10
Author: me@taehoonlee.com
File Name: tensornets/pretrained.py
Class Name:
Method Name: direct


Project Name: explosion/spaCy
Commit Name: 4fa96705379b10b761a7097b1adb12145402cb1f
Time: 2020-05-20
Author: adrianeboyd@gmail.com
File Name: spacy/lemmatizer.py
Class Name: Lemmatizer
Method Name: __call__


Project Name: commonsense/conceptnet5
Commit Name: 9582b206c63f01ca3f6990f50b0cd7754e2fe65b
Time: 2013-05-24
Author: rob@luminoso.com
File Name: conceptnet5/nodes.py
Class Name:
Method Name: make_concept_uri