4999f9795af7a21ca69adf5f72301b79f719498e,gluoncv/model_zoo/pspnet.py,PSPNet,__init__,#PSPNet#Any#Any#Any#Any#,33

Before Change


    def __init__(self, nclass, backbone="resnet50", norm_layer=nn.BatchNorm,
                 aux=True, **kwargs):
        super(PSPNet, self).__init__(nclass, backbone, aux, norm_layer, **kwargs)
        with self.name_scope():
            self.head = _PSPHead(nclass, norm_layer=norm_layer, **kwargs)
            self.head.initialize()
            self.head.collect_params().setattr("lr_mult", 10)
            if self.aux:
                self.auxlayer = _FCNHead(1024, nclass, norm_layer=norm_layer, **kwargs)
                self.auxlayer.initialize()
                self.auxlayer.collect_params().setattr("lr_mult", 10)

    def forward(self, x):
        _, _, H, W = x.shape
        c3, c4 = self.base_forward(x)
        outputs = []

After Change


            self.head = _PSPHead(nclass, norm_layer=norm_layer, **kwargs)
            self.head.initialize()
            self.head.collect_params().setattr("lr_mult", 10)
            if self.aux:
                self.auxlayer = _FCNHead(1024, nclass, norm_layer=norm_layer, **kwargs)
                self.auxlayer.initialize()
                self.auxlayer.collect_params().setattr("lr_mult", 10)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: dmlc/gluon-cv
Commit Name: 4999f9795af7a21ca69adf5f72301b79f719498e
Time: 2018-06-05
Author: 8041160+zhanghang1989@users.noreply.github.com
File Name: gluoncv/model_zoo/pspnet.py
Class Name: PSPNet
Method Name: __init__


Project Name: williamFalcon/pytorch-lightning
Commit Name: 141316fb2911df0475554e66798441855cc08b1b
Time: 2021-02-16
Author: thomas@grid.ai
File Name: pl_examples/domain_templates/computer_vision_fine_tuning.py
Class Name:
Method Name: main


Project Name: streamlit/streamlit
Commit Name: 5ca403cee17ee1e2a704e03bf06d47f2ce9ba222
Time: 2020-02-06
Author: naomi@nthmost.com
File Name: examples/audio.py
Class Name:
Method Name: