3bfbab7afd5850b4f21b73dd3184374f47eb1d98,models.py,,create_modules,#Any#Any#Any#,10

Before Change


            size = int(mdef["size"])
            stride = int(mdef["stride"]) if "stride" in mdef else (int(mdef["stride_y"]), int(mdef["stride_x"]))
            pad = (size - 1) // 2 if int(mdef["pad"]) else 0
            modules.add_module("Conv2d", nn.Conv2d(in_channels=output_filters[-1],
                                                   out_channels=filters,
                                                   kernel_size=size,
                                                   stride=stride,
                                                   padding=pad,
                                                   bias=not bn))
            if bn:
                modules.add_module("BatchNorm2d", nn.BatchNorm2d(filters, momentum=0.1))
            if mdef["activation"] == "leaky":  // TODO: activation study https://github.com/ultralytics/yolov3/issues/441
                modules.add_module("activation", nn.LeakyReLU(0.1, inplace=True))

After Change

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: ultralytics/yolov3
Commit Name: 3bfbab7afd5850b4f21b73dd3184374f47eb1d98
Time: 2019-12-09
Author: glenn.jocher@ultralytics.com
File Name: models.py
Class Name:
Method Name: create_modules


Project Name: osmr/imgclsmob
Commit Name: 395b1fc3df754c21a6b7aebc79a1d950bfdc1efc
Time: 2018-10-29
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/squeezenext.py
Class Name: SqueezeNext
Method Name: __init__


Project Name: reinforceio/tensorforce
Commit Name: 89ef2b21c7ea77929819dec7ba589c13c49bd702
Time: 2019-01-26
Author: alexkuhnle@t-online.de
File Name: tensorforce/core/networks/network.py
Class Name: LayeredNetwork
Method Name: parse_layers_spec