Skip to content

Commit

Permalink
fix for metagan discriminator
Browse files Browse the repository at this point in the history
  • Loading branch information
the-database committed Jan 7, 2025
1 parent 72e75e6 commit 695facd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions traiNNer/models/sr_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,10 @@ def optimize_parameters(
for label, loss in self.losses.items():
if label == "l_g_gan":
assert self.net_d is not None
self.net_d.eval()
fake_g_pred = self.net_d(self.output)
l_g_loss = loss(fake_g_pred, True, is_disc=False)
self.net_d.train()
else:
l_g_loss = loss(self.output, self.gt)

Expand Down

0 comments on commit 695facd

Please sign in to comment.