0acfbc16e60efe8e4b6666196d4111206db29254,models/resnet.py,PreActBottleneck,forward,#PreActBottleneck#,120

Before Change



    def forward(self, x):
        out = F.relu(self.bn1(x))
        shortcut = self.shortcut(out)
        out = self.conv1(out)
        out = self.conv2(F.relu(self.bn2(out)))
        out = self.conv3(F.relu(self.bn3(out)))
        out += shortcut
        return out

After Change



    def forward(self, x):
        out = F.relu(self.bn1(x))
        shortcut = self.shortcut(out) if hasattr(self, "shortcut") else x
        out = self.conv1(out)
        out = self.conv2(F.relu(self.bn2(out)))
        out = self.conv3(F.relu(self.bn3(out)))
        out += shortcut
        return out

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: kuangliu/pytorch-cifar
Commit Name: 0acfbc16e60efe8e4b6666196d4111206db29254
Time: 2017-07-24
Author: kuang.liu@hotmail.com
File Name: models/resnet.py
Class Name: PreActBottleneck
Method Name: forward


Project Name: kuangliu/pytorch-cifar
Commit Name: 0acfbc16e60efe8e4b6666196d4111206db29254
Time: 2017-07-24
Author: kuang.liu@hotmail.com
File Name: models/resnet.py
Class Name: PreActBlock
Method Name: forward


Project Name: kuangliu/pytorch-cifar
Commit Name: 9c40489751bdf173b7da2b1f7cf9ef3657988eb8
Time: 2017-05-02
Author: kuang.liu@hotmail.com
File Name: models/resnet.py
Class Name: BasicBlock
Method Name: forward


Project Name: kuangliu/pytorch-cifar
Commit Name: 9c40489751bdf173b7da2b1f7cf9ef3657988eb8
Time: 2017-05-02
Author: kuang.liu@hotmail.com
File Name: models/resnet.py
Class Name: Bottleneck
Method Name: forward