keras-io icon indicating copy to clipboard operation
keras-io copied to clipboard

Question about Loss in Keras MelGAN tutorial

Open basbrs opened this issue 3 years ago • 0 comments
trafficstars

This issue is about keras' (amazing, if i may add) tutorial about the MelGAN audio synthesis network.

In line 387 and the following we define the generator's loss.

grafik

Why would we pass ground truth (real_pred) and generator prediction (fake_pred) while using only the fake_pred argument within the code? I'd assume that this is a mistake, because what we want to do is calculate the difference between the two, don't we? Right now what we're doing is calculating the loss between a tensor of ones and the generated sample...

I'd appreciate your help or your clarification, have a nice day.

EDIT: I found some similar losses right here and in the original tutorial it's clearly written that we want to compute the loss between ones and the outputs from the discriminator with N layers (quote). So I think that this was done intentionally (though I still don't get why you would pass real_pred). Maybe someone can explain?

basbrs avatar Mar 11 '22 09:03 basbrs