clovaai / stargan-v2

StarGAN v2 - Official PyTorch Implementation (CVPR 2020)
Other
3.48k stars 653 forks source link

adv_loss function #126

Closed Yunyung closed 2 years ago

Yunyung commented 2 years ago

Hi, It seems that adv_loss function in core/solver.py maybe wrong in my opinion?

def adv_loss(logits, target):
    assert target in [1, 0]
    targets = torch.full_like(logits, fill_value=target)
    loss = F.binary_cross_entropy_with_logits(logits, targets)
    return loss

If there are multi-domain, I think must one label is 1 and other is 0 rather than fill targets with all one or zero