akanimax / akanimax/big-discriminator-batch-spoofing-gan
Wrong calculation of LSGAN
- Langage dominant
- Python
- Étoiles
- 45
- Forks
- 7
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
There exists an apparent error in the implementation of LSGAN below.
https://github.com/akanimax/BBMSG-GAN/blob/da82aa2e8507d17801bd2134a4ae754335d716f5/sourcecode/MSG_GAN/Losses.py#L145
Right implementation:
```python
class LSGAN(GANLoss):
def __init__(self, dis):
super().__init__(dis)
def dis_loss(self, real_samps, fake_samps):
real_scores = th.mean((self.dis(real_samps) - 1) ** 2)
fake_scores = th.mean(self.dis(fake_samps) ** 2)
return 0.5 * (real_scores + fake_scores)
def gen_loss(self, _, fake_samps):
return 0.5 * th.mean((self.dis(fake_samps) - 1) ** 2)
```
reference equation 8 of [Least Squares Generative Adversarial Networks].

Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.