IndexError: too many indices for tensor of dimension 2
Closed this issue · 1 comments
lx2u16 commented
Hi,
Thanks for sharing the nice work.
I have this IndexError: too many indices for tensor of dimension 2 while running pesq_metric = pesq_score(dcunet10, test_loader)
.
I wonder if you know why?
Best,
Lei
Xu-Kaibo commented
The code in this function should be modified a little:
pred_x_16 = torchaudio.transforms.Resample(48000, 16000)(pred_x[i, 0,:].view(1,-1))
pred_x_16 = torchaudio.transforms.Resample(48000, 16000)(pred_x[i, :].view(1,-1))
You can load a sample pair using dataloader and print the size of the speech