Skip to content

Commit

Permalink
fix: gradient truncation bug in pit_solver.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YuzhuWang-code committed Dec 7, 2024
1 parent cccc290 commit d5382f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions espnet2/enh/loss/wrappers/pit_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ def pair_loss(permutation):
perm0 = perm_.unsqueeze(1)
stats[k] = new_v.gather(1, perm0.to(device=new_v.device)).unbind(1)
else:
loss = torch.tensor(
loss = torch.stack(
[
torch.tensor(
torch.stack(
[
pre_hook(
self.criterion,
Expand Down

0 comments on commit d5382f1

Please sign in to comment.