cff50d785a5fddd1fc8722fd993b63d4978da381,models/models.py,ModelBuilder,build_encoder,#ModelBuilder#Any#Any#Any#,74

Before Change


            orig_resnet = resnet.__dict__["resnet18"](pretrained=pretrained)
            net_encoder = ResnetDilated(orig_resnet,
                                        dilate_scale=8)
        elif arch == "resnet18_dilated16":
            orig_resnet = resnet.__dict__["resnet18"](pretrained=pretrained)
            net_encoder = ResnetDilated(orig_resnet,
                                        dilate_scale=16)
        elif arch == "resnet34":
            raise NotImplementedError
            orig_resnet = resnet.__dict__["resnet34"](pretrained=pretrained)
            net_encoder = Resnet(orig_resnet)
        elif arch == "resnet34_dilated8":
            raise NotImplementedError
            orig_resnet = resnet.__dict__["resnet34"](pretrained=pretrained)
            net_encoder = ResnetDilated(orig_resnet,
                                        dilate_scale=8)
        elif arch == "resnet34_dilated16":
            raise NotImplementedError
            orig_resnet = resnet.__dict__["resnet34"](pretrained=pretrained)
            net_encoder = ResnetDilated(orig_resnet,
                                        dilate_scale=16)
        elif arch == "resnet50":
            orig_resnet = resnet.__dict__["resnet50"](pretrained=pretrained)
            net_encoder = Resnet(orig_resnet)
        elif arch == "resnet50_dilated8":
            orig_resnet = resnet.__dict__["resnet50"](pretrained=pretrained)
            net_encoder = ResnetDilated(orig_resnet,
                                        dilate_scale=8)
        elif arch == "resnet50_dilated16":
            orig_resnet = resnet.__dict__["resnet50"](pretrained=pretrained)
            net_encoder = ResnetDilated(orig_resnet,
                                        dilate_scale=16)
        elif arch == "resnet101":
            orig_resnet = resnet.__dict__["resnet101"](pretrained=pretrained)
            net_encoder = Resnet(orig_resnet)
        elif arch == "resnet101_dilated8":
            orig_resnet = resnet.__dict__["resnet101"](pretrained=pretrained)
            net_encoder = ResnetDilated(orig_resnet,
                                        dilate_scale=8)
        elif arch == "resnet101_dilated16":
            orig_resnet = resnet.__dict__["resnet101"](pretrained=pretrained)
            net_encoder = ResnetDilated(orig_resnet,
                                        dilate_scale=16)
        elif arch == "resnext101":
            orig_resnext = resnext.__dict__["resnext101"](pretrained=pretrained)
            net_encoder = Resnet(orig_resnext) // we can still use class Resnet
        else:

After Change



    def build_encoder(self, arch="resnet50dilated", fc_dim=512, weights=""):
        pretrained = True if len(weights) == 0 else False
        arch = arch.lower()
        if arch == "resnet18":
            orig_resnet = resnet.__dict__["resnet18"](pretrained=pretrained)
            net_encoder = Resnet(orig_resnet)
        elif arch == "resnet18dilated":
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: CSAILVision/semantic-segmentation-pytorch
Commit Name: cff50d785a5fddd1fc8722fd993b63d4978da381
Time: 2018-11-28
Author: zhaohang0124@gmail.com
File Name: models/models.py
Class Name: ModelBuilder
Method Name: build_encoder


Project Name: CSAILVision/semantic-segmentation-pytorch
Commit Name: cff50d785a5fddd1fc8722fd993b63d4978da381
Time: 2018-11-28
Author: zhaohang0124@gmail.com
File Name: models/models.py
Class Name: ModelBuilder
Method Name: build_encoder


Project Name: mne-tools/mne-python
Commit Name: 9fc8623eebd62d31039e90927744e376f5ee611c
Time: 2021-01-28
Author: larson.eric.d@gmail.com
File Name: mne/gui/_fiducials_gui.py
Class Name: FiducialsPanel
Method Name: _on_set_change


Project Name: scikit-learn-contrib/DESlib
Commit Name: ec396411be11d514a44a18813278f3a41c73ac5f
Time: 2018-09-23
Author: Natlem@users.noreply.github.com
File Name: deslib/des/des_knn.py
Class Name: DESKNN
Method Name: __init__