9b0a0dd6fe7b4ac021d91acc6b4f96b403dd6b67,models.py,Darknet,forward,#Darknet#,250

Before Change


            yolo_layer.img_dim = x.shape[2]
        output = []
        loss = 0
        layer_outputs = []
        for i, (module_def, module) in enumerate(zip(self.module_defs, self.module_list)):
            if module_def["type"] in ["convolutional", "upsample", "maxpool"]:
                x = module(x)
            elif module_def["type"] == "route":
                layer_i = [int(x) for x in module_def["layers"].split(",")]
                x = torch.cat([layer_outputs[i] for i in layer_i], 1)
            elif module_def["type"] == "shortcut":
                layer_i = int(module_def["from"])
                x = layer_outputs[-1] + layer_outputs[layer_i]
            elif module_def["type"] == "yolo":

After Change


            if module_def["type"] in ["convolutional", "upsample", "maxpool"]:
                x = module(x)
            elif module_def["type"] == "route":
                x = torch.cat([layer_outputs[int(layer_i)] for layer_i in module_def["layers"].split(",")], 1)
            elif module_def["type"] == "shortcut":
                layer_i = int(module_def["from"])
                x = layer_outputs[-1] + layer_outputs[layer_i]
            elif module_def["type"] == "yolo":
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


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: osmr/imgclsmob
Commit Name: 0c7d4353191b13cc2ec021b7adeeb41d44ca7054
Time: 2021-02-15
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/others/_espnet.py
Class Name: ESPNet
Method Name: forward


Project Name: eriklindernoren/PyTorch-GAN
Commit Name: 285c260934d37261d4c55fffbbeea32ce308cc53
Time: 2019-04-18
Author: eriklindernoren@live.se
File Name: implementations/esrgan/models.py
Class Name: DenseResidualBlock
Method Name: forward


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