yunjey / domain-transfer-network

TensorFlow Implementation of Unsupervised Cross-Domain Image Generation
MIT License
862 stars 203 forks source link

Ternary classification of D #7

Closed DonghyunK closed 7 years ago

DonghyunK commented 7 years ago

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.

yunjey commented 7 years ago

@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.

DonghyunK commented 7 years ago

@yunjey Ok, thank you for your help!