Skip to content

Commit

Permalink
Merge pull request espnet#5974 from YuzhuWang-code/fix_bug_gradient_t…
Browse files Browse the repository at this point in the history
…runcation_in_pit_solver

fix: gradient truncation bug in pit_solver.py
  • Loading branch information
sw005320 authored Dec 8, 2024
2 parents efd0d59 + d5382f1 commit 9e0876d
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 9e0876d

Please sign in to comment.