Skip to content

Commit 003b3a9

Browse files
committed
Remove unnecessary backward code
1 parent 116de6f commit 003b3a9

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/libtorchaudio/rnnt/autograd.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
11
#include <libtorchaudio/rnnt/compute.h>
22

33
namespace torchaudio {
4-
namespace rnnt {
54

65

7-
8-
static torch::autograd::tensor_list backward(
9-
torch::autograd::AutogradContext* ctx,
10-
torch::autograd::tensor_list grad_outputs) {
11-
auto saved = ctx->get_saved_variables();
12-
auto grad = saved[0];
13-
auto grad_out = grad_outputs[0].view({-1, 1, 1, 1});
14-
auto result = grad * grad_out;
15-
torch::Tensor undef;
16-
return {result, undef, undef, undef, undef, undef, undef, undef};
17-
}
18-
}
19-
206
TORCH_LIBRARY_FRAGMENT(torchaudio, m) {
217
m.def("torchaudio::rnnt_loss_forward", &rnnt_loss);
228
}

0 commit comments

Comments
 (0)