pull/422/head
Eren Gölge 2021-04-07 10:25:33 +02:00
parent 7726dfca99
commit bd7a1c177b
1 changed files with 5 additions and 1 deletions

View File

@ -216,7 +216,11 @@ class MelganFeatureLoss(nn.Module):
def forward(self, fake_feats, real_feats):
loss_feats = 0
num_feats = 0
<<<<<<< HEAD
for idx, _ in enumerate(fake_feats):
=======
for idx in range(len(fake_feats)):
>>>>>>> fix #419
for fake_feat, real_feat in zip(fake_feats[idx], real_feats[idx]):
loss_feats += self.loss_func(fake_feat, real_feat)
num_feats += 1
@ -335,7 +339,7 @@ class GeneratorLoss(nn.Module):
if self.use_l1_spec_loss:
l1_spec_loss = self.l1_spec_loss(y_hat, y)
return_dict['G_l1_spec_loss'] = l1_spec_loss
gen_loss += self.l1_spec_loss_weight * l1_spec_loss
gen_loss = gen_loss + self.l1_spec_loss_weight * l1_spec_loss
# subband STFT Loss
if self.use_subband_stft_loss: