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


    def forward(self, x, targets=None):
        img_dim = x.shape[2]
        loss = 0
        layer_outputs, yolo_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":
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: HyperGAN/HyperGAN
Commit Name: 0389fda574d618ec22b488208a1d597a18d7ce72
Time: 2020-12-24
Author: martyn@255bits.com
File Name: examples/next-frame.py
Class Name: NextFrameGAN
Method Name: forward_pass


Project Name: nerox8664/pytorch2keras
Commit Name: 49dc427e2c196a334dc7b173ff317e05f04813e7
Time: 2018-01-29
Author: nerox8664@gmail.com
File Name: tests/concat_many.py
Class Name: TestConcatMany
Method Name: forward