Skip to content

AE-GAN with BN Cheating

Compare
Choose a tag to compare
@moto-hellomoto-ai moto-hellomoto-ai released this 16 May 16:12
dd01034

AE with Batch Normalization at the last layer of the encoder.

The detail can be found here.

This model is Epoch 43, which still produces some fake images.

Model: AeGan(
  (ae): AE(
    (encoder): Encoder(
      (convs): Sequential(
        (0): EncoderBlock(
          (0): ReflectionPad2d((2, 2, 2, 2))
          (1): Conv2d(3, 64, kernel_size=(5, 5), stride=(2, 2), bias=False)
          (2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (3): ReLU()
        )
        (1): EncoderBlock(
          (0): ReflectionPad2d((2, 2, 2, 2))
          (1): Conv2d(64, 128, kernel_size=(5, 5), stride=(2, 2), bias=False)
          (2): BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (3): ReLU()
        )
        (2): EncoderBlock(
          (0): ReflectionPad2d((2, 2, 2, 2))
          (1): Conv2d(128, 256, kernel_size=(5, 5), stride=(2, 2), bias=False)
          (2): BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (3): ReLU()
        )
      )
      (map): Sequential(
        (0): Linear(in_features=36864, out_features=1024, bias=False)
        (1): BatchNorm1d(1024, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      )
    )
    (decoder): Decoder(
      (map): Linear(in_features=1024, out_features=36864, bias=True)
      (convs): Sequential(
        (0): DecoderBlock(
          (0): ConvTranspose2d(256, 256, kernel_size=(5, 5), stride=(2, 2), padding=(2, 2), bias=False)
          (1): InstanceNorm2d(256, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False)
          (2): LeakyReLU(negative_slope=0.01)
        )
        (1): DecoderBlock(
          (0): ConvTranspose2d(256, 128, kernel_size=(5, 5), stride=(2, 2), padding=(2, 2), bias=False)
          (1): InstanceNorm2d(128, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False)
          (2): LeakyReLU(negative_slope=0.01)
        )
        (2): DecoderBlock(
          (0): ConvTranspose2d(128, 64, kernel_size=(5, 5), stride=(2, 2), padding=(2, 2), bias=False)
          (1): InstanceNorm2d(64, eps=1e-05, momentum=0.1, affine=False, track_running_stats=False)
          (2): LeakyReLU(negative_slope=0.01)
        )
        (3): ReflectionPad2d((2, 2, 2, 2))
        (4): Conv2d(64, 3, kernel_size=(5, 5), stride=(1, 1))
      )
    )
  )
  (discriminator): Discriminator(
    (convs): Sequential(
      (0): ReflectionPad2d((2, 2, 2, 2))
      (1): Conv2d(3, 32, kernel_size=(5, 5), stride=(1, 1))
      (2): ReflectionPad2d((2, 2, 2, 2))
      (3): Conv2d(32, 128, kernel_size=(5, 5), stride=(2, 2))
      (4): ReflectionPad2d((2, 2, 2, 2))
      (5): Conv2d(128, 256, kernel_size=(5, 5), stride=(2, 2))
      (6): ReflectionPad2d((2, 2, 2, 2))
      (7): Conv2d(256, 256, kernel_size=(5, 5), stride=(2, 2))
    )
    (fc): Sequential(
      (0): Linear(in_features=36864, out_features=512, bias=True)
      (1): ReLU(inplace)
      (2): Linear(in_features=512, out_features=1, bias=True)
      (3): Sigmoid()
    )
  )
)