Skip to content

Commit

Permalink
[src] Fix cumulative normalization (asteroid-team#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmolikova authored Nov 11, 2022
1 parent 140733b commit 9c543ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asteroid/masknn/norms.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def forward(self, x, EPS: float = 1e-8):
start=chan, end=chan * (spec_len + 1), step=chan, dtype=x.dtype, device=x.device
).view(1, 1, -1)
cum_mean = cum_sum / cnt
cum_var = cum_pow_sum - cum_mean.pow(2)
cum_var = cum_pow_sum / cnt - cum_mean.pow(2)
return self.apply_gain_and_bias((x - cum_mean) / (cum_var + EPS).sqrt())


Expand Down

0 comments on commit 9c543ec

Please sign in to comment.