Oke, this is my listing program
This is my small code of Generator Network
class Generator(nn.Module):
def init(self, input, residual_block, output=64):
super(Generator, self).init()
    model = [
        nn.ReflectionPad2d(1),
        nn.Conv2d(input, output, 7),
        nn.InstanceNorm2d(output),
        nn.ReLU(True),
    ]

This is my small code of Discriminator Network
class Discriminator(nn.Module):
def init(self, input):
super(Discriminator, self).init()
    channels, heigh, width = input

    #---calculate output shape of image discriminator (PatchGAN)---
    self.output = (1, heigh//2**4, width//2**4)

    def discriminator_block(in_shape, out_shape, normalize=True):
        """Returnt downsampling layers of each discriminator block"""
        layers = [nn.Conv2d(in_shape, out_shape, 4, stride=2, padding=1)]
        if normalize:
            layers.append(nn.InstanceNorm2d(out_shape))
        layers.append(nn.LeakyReLU(0.2, inplace=True))
        return layers

    self.model = nn.Sequential(
        *discriminator_block(input, 64, normalize=False),
        *discriminator_block(64, 128),
        *discriminator_block(128, 256),
        *discriminator_block(256, 512),
        nn.ZeroPad2d((1, 0, 1, 0)),
        nn.Conv2d(512, 1, 4, padding=1)
    )class Discriminator(nn.Module):
def __init__(self, input):
    super(Discriminator, self).__init__()

    channels, heigh, width = input

    #---calculate output shape of image discriminator (PatchGAN)---
    self.output = (1, heigh//2**4, width//2**4)

    def discriminator_block(in_shape, out_shape, normalize=True):
        """Returnt downsampling layers of each discriminator block"""
        layers = [nn.Conv2d(in_shape, out_shape, 4, stride=2, padding=1)]
        if normalize:
            layers.append(nn.InstanceNorm2d(out_shape))
        layers.append(nn.LeakyReLU(0.2, inplace=True))
        return layers

    self.model = nn.Sequential(
        *discriminator_block(input, 64, normalize=False),
        *discriminator_block(64, 128),
        *discriminator_block(128, 256),
        *discriminator_block(256, 512),
        nn.ZeroPad2d((1, 0, 1, 0)),
        nn.Conv2d(512, 1, 4, padding=1)
    )

and This is my main program to call the generator and discriminator
G_AB = Generator(3, opt.n_residual_blocks)
G_BA = Generator(3, opt.n_residual_blocks)
D_A = Discriminator(input_shape)
D_B = Discriminator(input_shape)