f90 / Wave-U-Net

Implementation of the Wave-U-Net for audio source separation
MIT License
824 stars 177 forks source link

Fix validation/test loss to be mean of source losses. #27

Closed matangover closed 5 years ago

matangover commented 5 years ago

One tab character too much. :)

The test function was reporting a loss that was too low. The loss put a different weight on each source, relative to the order of model_config['source_names'].

For example, in the case of two sources (voice and accompaniment), the loss should be (voice_loss + accomp_loss) / 2 but instead it was voice_loss / 4 + accomp_loss / 2.

(The training loss was and remains correct.)

f90 commented 5 years ago

Good catch! Thanks! Fortunately doesn't really affect training itself so one can expect the resulting models after training to not change significantly after introducing this fix.