yunjey / domain-transfer-network

TensorFlow Implementation of Unsupervised Cross-Domain Image Generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ternary classification of D

DonghyunK opened this issue · comments

Hi,

As written in the paper, D is a ternary classification function.

In your codes,

  1. from source
    self.d_loss_src = slim.losses.sigmoid_cross_entropy(self.logits, tf.zeros_like(self.logits))

  2. from trarget
    self.d_loss_fake_trg = slim.losses.sigmoid_cross_entropy(self.logits_fake,tf.zeros_like(self.logits_fake))
    self.d_loss_real_trg = slim.losses.sigmoid_cross_entropy(self.logits_real, tf.ones_like(self.logits_real))

It seems that the function D in your code is a binary classification function.

Could you please explain it?

Thanks.

@DonghyunK You are right. The authors mentioned they use the ternary classifier as the discriminator. However, even the binary classifier, the model can generate images well. I think you can easily modify the code.

@yunjey
Ok, thank you for your help!