c7f7d1979a35b443dba7e776203ed7084efecf77,models/networks.py,ResnetBlock,build_conv_block,#ResnetBlock#,185

Before Change


        conv_block = []
        p = 0
        // TODO: support padding types
        assert(padding_type == "zero")
        p = 1

        // TODO: InstanceNorm
        conv_block += [nn.Conv2d(dim, dim, kernel_size=3, padding=p),

After Change


            conv_block += [nn.Dropout(0.5)]

        p = 0
        if padding_type == "reflect":
            conv_block += [nn.ReflectionPad2d(1)]
        elif padding_type == "replicate":
            conv_block += [nn.ReplicationPad2d(1)]
        elif padding_type == "zero":
            p = 1
        else:
            raise NotImplementedError("padding [%s] is not implemented" % padding_type)
        conv_block += [nn.Conv2d(dim, dim, kernel_size=3, padding=p),
                       norm_layer(dim)]

        return nn.Sequential(*conv_block)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: richzhang/colorization-pytorch
Commit Name: c7f7d1979a35b443dba7e776203ed7084efecf77
Time: 2017-07-05
Author: junyanz@berkeley.edu
File Name: models/networks.py
Class Name: ResnetBlock
Method Name: build_conv_block


Project Name: fgnt/nara_wpe
Commit Name: 6c89ec0f602e12acb0efe50d7eb626f781e911bf
Time: 2018-05-24
Author: mail@lukas-drude.de
File Name: nara_wpe/wpe.py
Class Name:
Method Name: wpe_v8


Project Name: fgnt/nara_wpe
Commit Name: ab6b42b73b4d8fed909b041966bebe8b025889e2
Time: 2018-05-28
Author: mail@lukas-drude.de
File Name: nara_wpe/wpe.py
Class Name:
Method Name: wpe_v8