Getting RuntimeError when attempting to run inference
jagilley opened this issue · comments
Jasper commented
Hi team - can't wait to try this! I'm getting the following RuntimeError
when trying to run inference with the pretrained model:
RuntimeError Traceback (most recent call last)
[<ipython-input-5-487bd8f6f6cf>](https://localhost:8080/#) in <module>
29
30 # Infer pitch and periodicity
---> 31 pitch, periodicity = penn.from_audio(
32 audio,
33 penn.SAMPLE_RATE,
[/usr/local/lib/python3.8/dist-packages/torch/nn/modules/conv.py](https://localhost:8080/#) in _conv_forward(self, input, weight, bias)
307 weight, bias, self.stride,
308 _single(0), self.dilation, self.groups)
--> 309 return F.conv1d(input, weight, bias, self.stride,
310 self.padding, self.dilation, self.groups)
311
RuntimeError: Given groups=1, weight of size [256, 1, 32], expected input[2048, 2, 993] to have 1 channels, but got 2 channels instead
I'm getting this with both CPU and GPU inference, and having installed both via pip and having cloned from Github. Do you know what might be the problem?
Xavier Riley commented
It looks like it expects a mono file and you're providing stereo. Could you try converting it to mono to see if that works? This seems like a good place to include a warning.
Max Morrison commented
Moved to #7