Skip to content

Commit

Permalink
fix: use reshape for noncontiguous dy (#3794)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyolicoris authored Jun 24, 2024
1 parent b829e93 commit 7f6209b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libtorchaudio/lfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class DifferentiableIIR : public torch::autograd::Function<DifferentiableIIR> {

da = F::conv1d(
dyda.view({1, n_batch * n_channel, -1}),
dy.view({n_batch * n_channel, 1, -1}),
dy.reshape({n_batch * n_channel, 1, -1}),
F::Conv1dFuncOptions().groups(n_batch * n_channel))
.view({n_batch, n_channel, -1})
.sum(0)
Expand Down

0 comments on commit 7f6209b

Please sign in to comment.