Skip to content

Commit

Permalink
Add epsilon
Browse files Browse the repository at this point in the history
  • Loading branch information
mpariente committed Sep 30, 2024
1 parent 71b98e8 commit 97487fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch_stoi/stoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def forward(
# Compute average (E)STOI w. or w/o VAD.
output = corr_comp.mean(1)
if self.use_vad:
output = output.sum(-1) / mask.sum(-1)
output = output.sum(-1) / (mask.sum(-1) + EPS)
else:
output = output.mean(-1)

Expand Down

0 comments on commit 97487fa

Please sign in to comment.