asteroid-team / asteroid

The PyTorch-based audio source separation toolkit for researchers
https://asteroid-team.github.io/
MIT License
2.21k stars 419 forks source link

Cumulative normalization, wrong variance computation #648

Closed zmolikova closed 1 year ago

zmolikova commented 1 year ago

Hi, I suspect that the computation of variance in CumLN is missing a division by the length of the sequence. That is:

https://github.com/asteroid-team/asteroid/blob/140733bbaafb5940e1b542c7522d4e3b0ba875bb/asteroid/masknn/norms.py#L101

should be cum_var = cum_pow_sum / cnt - cum_mean.pow(2) as in $var(x) = E[x^2] - E[x]^2$.

mpariente commented 1 year ago

You're fully right, thank you !

Could you please submit a PR ?