4d444c8d8824fd460034e04e75e4270734ec96fe,implementations/discogan/models.py,Discriminator,__init__,#Discriminator#Any#,154

Before Change


            layers.append(nn.LeakyReLU(0.2, inplace=True))
            return layers

        layers = []
        in_filters = in_channels
        for out_filters, stride, normalize in [ (64, 2, False),
                                                (128, 2, True),
                                                (256, 2, True),
                                                (512, 2, True)]:
            layers.extend(discriminator_block(in_filters, out_filters, stride, normalize))
            in_filters = out_filters

        layers.append(nn.Conv2d(out_filters, 1, 3, 1, 1))

        self.model = nn.Sequential(*layers)

    def forward(self, img):
        return self.model(img)

After Change


            layers.append(nn.LeakyReLU(0.2, inplace=True))
            return layers

        self.model = nn.Sequential(
            *discriminator_block(in_channels, 64, 2, False),
            *discriminator_block(64, 128, 2, True),
            *discriminator_block(128, 256, 2, True),
            *discriminator_block(256, 512, 2, True),
            nn.Conv2d(512, 1, 3, 1, 1)
        )

    def forward(self, img):
        return self.model(img)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 31

Instances


Project Name: eriklindernoren/PyTorch-GAN
Commit Name: 4d444c8d8824fd460034e04e75e4270734ec96fe
Time: 2018-04-24
Author: eriklindernoren@gmail.com
File Name: implementations/discogan/models.py
Class Name: Discriminator
Method Name: __init__


Project Name: eriklindernoren/PyTorch-GAN
Commit Name: d63b5f9934bbc6a01ea16a10bae56f0fc19736c1
Time: 2018-04-24
Author: eriklindernoren@gmail.com
File Name: implementations/pix2pix/models.py
Class Name: Discriminator
Method Name: __init__


Project Name: eriklindernoren/PyTorch-GAN
Commit Name: d63b5f9934bbc6a01ea16a10bae56f0fc19736c1
Time: 2018-04-24
Author: eriklindernoren@gmail.com
File Name: implementations/cyclegan/models.py
Class Name: Discriminator
Method Name: __init__


Project Name: eriklindernoren/PyTorch-GAN
Commit Name: 4d444c8d8824fd460034e04e75e4270734ec96fe
Time: 2018-04-24
Author: eriklindernoren@gmail.com
File Name: implementations/discogan/models.py
Class Name: Discriminator
Method Name: __init__