⚗️ | Small fixes here and there
This commit is contained in:
@@ -44,13 +44,8 @@ def discriminator_loss(disc_real_outputs, disc_generated_outputs):
|
||||
|
||||
|
||||
def generator_adv_loss(disc_generated_outputs):
|
||||
"""
|
||||
Least Squares GAN Loss for the Generator.
|
||||
Objective: Fake -> 1 (Fool the discriminator)
|
||||
"""
|
||||
loss = 0
|
||||
for dg in zip(disc_generated_outputs):
|
||||
dg = dg[0] # Unpack tuple
|
||||
loss = 0.0
|
||||
for dg in disc_generated_outputs:
|
||||
loss += torch.mean((dg - 1) ** 2)
|
||||
return loss
|
||||
|
||||
|
||||
Reference in New Issue
Block a user