0e52f273bc0158e05af766e2d1006b3c5198e9c3,models/densenet.py,_DenseLayer,forward,#_DenseLayer#,24

Before Change


        self.drop_rate = drop_rate

    def forward(self, *prev_features):
        concated_features = torch.cat(prev_features, 1)
        bottleneck_output = self.conv1(self.relu1(self.norm1(concated_features)))
        new_features = self.conv2(self.relu2(self.norm2(bottleneck_output)))
        if self.drop_rate > 0:
            new_features = F.dropout(new_features, p=self.drop_rate, training=self.training)
        return new_features

After Change



    def forward(self, *prev_features):
        bn_function = _bn_function_factory(self.norm1, self.relu1, self.conv1)
        if self.efficient and any(prev_feature.requires_grad for prev_feature in prev_features):
            bottleneck_output = cp.checkpoint(bn_function, *prev_features)
        else:
            bottleneck_output = bn_function(*prev_features)
        new_features = self.conv2(self.relu2(self.norm2(bottleneck_output)))
        if self.drop_rate > 0:
            new_features = F.dropout(new_features, p=self.drop_rate, training=self.training)
        return new_features
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: gpleiss/efficient_densenet_pytorch
Commit Name: 0e52f273bc0158e05af766e2d1006b3c5198e9c3
Time: 2018-04-26
Author: gpleiss@gmail.com
File Name: models/densenet.py
Class Name: _DenseLayer
Method Name: forward


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 9b0a0dd6fe7b4ac021d91acc6b4f96b403dd6b67
Time: 2019-04-26
Author: eriklindernoren@live.se
File Name: models.py
Class Name: Darknet
Method Name: forward


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 012daf57ac31d82366323e7ec27ab7c2cb678a09
Time: 2018-05-27
Author: eriklindernoren@gmail.com
File Name: utils.py
Class Name:
Method Name: non_max_suppression


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 142bc348f80ae6c1f6ede5b598b0443af8048717
Time: 2018-05-22
Author: eriklindernoren@live.se
File Name: models.py
Class Name: Darknet
Method Name: forward