taoxugit / AttnGAN

MIT License
1.33k stars 415 forks source link

Discriminator loss function differs from paper? #48

Closed davidstap closed 5 years ago

davidstap commented 5 years ago

Can someone explain what the function of cond_wrong_errD is in the discriminator loss function? It seems not a part of the discriminator loss mentioned in the paper (Eq. 5). Also, it does not make sense to me. Why ignore the last entry in the batch?

cond_wrong_logits = netD.COND_DNET(real_features[:(batch_size - 1)], conditions[1:batch_size])
cond_wrong_errD = nn.BCELoss()(cond_wrong_logits, fake_labels[1:batch_size])
ShihuaHuang95 commented 5 years ago

unmatched loss

awkrail commented 3 years ago

Hi, I met the same problem. Is this loss unmatched loss written in the paper?