Skip to content

Commit de4d2e9

Browse files
committed
fix
1 parent be38eef commit de4d2e9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

aten/src/ATen/native/SpectralOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ Tensor istft(const Tensor& self, const int64_t n_fft, const optional<int64_t> ho
348348

349349
Tensor input = self;
350350
if (input_dim == 3) {
351-
input = input.unsqueeze();
351+
input = input.unsqueeze(0);
352352
}
353353

354354
input = input.transpose(1, 2); // size: (channel, n_frames, fft_size, 2)

test/test_torch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12263,7 +12263,7 @@ def _test_istft_is_inverse_of_stft(stft_kwargs):
1226312263
# trim the original for case when constructed signal is shorter than original
1226412264
original = original[..., :inversed.size(-1)]
1226512265
self.assertEqual(
12266-
inversed, original, 7e-6, 'istft comparison against original', exact_dtype=True)
12266+
inversed, original, 'istft comparison against original', atol=7e-6, exact_dtype=True)
1226712267

1226812268
patterns = [
1226912269
# hann_window, centered, normalized, onesided

0 commit comments

Comments
 (0)