piotrkawa/deepfake-whisper-features

RuntimeError: Expected 3-dimensional tensor

Opened this issue · 4 comments

When I use this model file: whisper_frontend_mesonet_mfcc.yaml, the following error occurs.

RuntimeError: Expected 3-dimensional tensor, but got 2-dimensional tensor for argument #1 'self' (while checking arguments for adaptive_avg_pool1d)

Hi,
can you please provide command you run, along with the related config and error stack trace?

Does this problem occurs when you run src/models/whisper_meso_net.py?

Hi, I have the same issue whenever I use every type of model with mesonet (whisper_mesonet, mfcc_mesonet, whisper_mfcc_mesonet). The problem occurs in file https://github.com/piotrkawa/deepfake-whisper-features/blob/main/src/models/meso_net.py in the 110 line. I will be grateful for help :)

In my case, the issue was incorrectly configured in the conda environment. Theoretically "conda list" showed loaded correct versions of packages (especially torch, and torchaudio), but in practice, python saw different versions. When I created carefully once again my virtual environment and made sure that Python saw the correct versions, everything started working well. :)