710b9ac1a28d418bddc41aeeda320ab4de4d17fe,torchreid/models/resnet.py,ResNet101,forward,#ResNet101#Any#,47

Before Change



    def forward(self, x):
        x = self.base(x)
        x = F.avg_pool2d(x, x.size()[2:])
        f = x.view(x.size(0), -1)
        if not self.training:
            return f
        y = self.classifier(f)

        if self.loss == {"xent"}:
            return y

After Change


        residual = x

        out = self.conv1(x)
        out = self.bn1(out)
        out = self.relu(out)

        out = self.conv2(out)
        out = self.bn2(out)

        if self.downsample is not None:
            residual = self.downsample(x)

        out += residual
        out = self.relu(out)

        return out


class Bottleneck(nn.Module):
    expansion = 4
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 710b9ac1a28d418bddc41aeeda320ab4de4d17fe
Time: 2018-10-26
Author: k.zhou@qmul.ac.uk
File Name: torchreid/models/resnet.py
Class Name: ResNet101
Method Name: forward


Project Name: Cadene/pretrained-models.pytorch
Commit Name: 0479011a730e44683645237537079a655e063e1e
Time: 2018-03-21
Author: remi.cadene@icloud.com
File Name: pretrainedmodels/models/dpn.py
Class Name: DPN
Method Name: forward


Project Name: Scitator/catalyst
Commit Name: 095f33895ca7b41e0574ab2fc22ec949b86324d9
Time: 2018-12-24
Author: scitator@gmail.com
File Name: modules/pooling.py
Class Name: GlobalAttnPool2d
Method Name: forward