Skip to content

Commit

Permalink
changed to re-compute y_ (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
kan-bayashi committed Apr 24, 2020
1 parent 5486c15 commit aabd569
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions parallel_wavegan/bin/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ def _train_step(self, batch):
# Discriminator #
#######################
if self.steps > self.config["discriminator_train_start_steps"]:
# re-compute y_ which leads better quality
with torch.no_grad():
y_ = self.model["generator"](*x)
# calculate discriminator loss
p = self.model["discriminator"](y.unsqueeze(1))
p_ = self.model["discriminator"](y_.unsqueeze(1).detach())
Expand Down

0 comments on commit aabd569

Please sign in to comment.