Click4Ai

458.

Hard

CycleGAN is a type of Generative Adversarial Network (GAN) that translates images from one domain to another. In this problem, you will implement a CycleGAN that translates images from the daytime to nighttime. The CycleGAN will consist of two generator networks, one for translating daytime images to nighttime images and another for translating nighttime images to daytime images, and two discriminator networks, one for discriminating between real daytime images and generated nighttime images and another for discriminating between real nighttime images and generated daytime images.

Example:

Suppose we have a dataset of 1000 daytime images and 1000 nighttime images. We want to train a CycleGAN to translate daytime images to nighttime images and nighttime images to daytime images.

Constraints:

  • The generator networks should have 5 layers with 128 units each.
  • The discriminator networks should have 5 layers with 128 units each.
  • The ReLU activation function should be used for the generator and discriminator networks.
  • The Adam optimizer should be used with a learning rate of 0.001.
  • Test Cases

    Test Case 1
    Input: [[1, 2], [3, 4]]
    Expected: None
    Test Case 2
    Input: [[5, 6], [7, 8]]
    Expected: None
    + 3 hidden test cases