"tests/vscode:/vscode.git/clone" did not exist on "491c19fe4aaaeb77ecc21923933ff922a5f3ad05"
Unverified Commit 20469cfe authored by Chin-Yun Yu's avatar Chin-Yun Yu Committed by GitHub
Browse files

Revert "Refactor implementation of F.compute_deltas (#1423)" (#1432)

This reverts commit 8d2eeb11.
parent f21d1683
...@@ -793,7 +793,7 @@ def compute_deltas( ...@@ -793,7 +793,7 @@ def compute_deltas(
# pack batch # pack batch
shape = specgram.size() shape = specgram.size()
specgram = specgram.reshape(-1, 1, shape[-1]) specgram = specgram.reshape(1, -1, shape[-1])
assert win_length >= 3 assert win_length >= 3
...@@ -804,9 +804,9 @@ def compute_deltas( ...@@ -804,9 +804,9 @@ def compute_deltas(
specgram = torch.nn.functional.pad(specgram, (n, n), mode=mode) specgram = torch.nn.functional.pad(specgram, (n, n), mode=mode)
kernel = torch.arange(-n, n + 1, 1, device=device, dtype=dtype).view(1, 1, -1) kernel = torch.arange(-n, n + 1, 1, device=device, dtype=dtype).repeat(specgram.shape[1], 1, 1)
output = torch.nn.functional.conv1d(specgram, kernel) / denom output = torch.nn.functional.conv1d(specgram, kernel, groups=specgram.shape[1]) / denom
# unpack batch # unpack batch
output = output.reshape(shape) output = output.reshape(shape)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment