znxlwm / UGATIT-pytorch

Official PyTorch implementation of U-GAT-IT: Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation
MIT License
2.51k stars 476 forks source link

Why does the UGATIT use 4 discriminators when training? #34

Closed zhanggd001 closed 5 years ago

zhanggd001 commented 5 years ago
    self.genA2B = ResnetGenerator(input_nc=3, output_nc=3, ngf=self.ch, n_blocks=self.n_res, img_size=self.img_size, light=self.light).to(self.device)
    self.genB2A = ResnetGenerator(input_nc=3, output_nc=3, ngf=self.ch, n_blocks=self.n_res, img_size=self.img_size, light=self.light).to(self.device)
    self.disGA = Discriminator(input_nc=3, ndf=self.ch, n_layers=7).to(self.device)
    self.disGB = Discriminator(input_nc=3, ndf=self.ch, n_layers=7).to(self.device)
    self.disLA = Discriminator(input_nc=3, ndf=self.ch, n_layers=5).to(self.device)
    self.disLB = Discriminator(input_nc=3, ndf=self.ch, n_layers=5).to(self.device)
NeverGiveU commented 5 years ago

well, this is multi-scale discriminator, one for global, one for local.

zhanggd001 commented 5 years ago

well, this is multi-scale discriminator, one for global, one for local.

Thanks.