self-attention-music-tagging
self-attention-music-tagging copied to clipboard
RuntimeError when executing visualize_example.ipynb
Hi there, I am trying to run the model on my own data. I used the 'preprocess.py' in the folder 'preprocessing/mtat' to preprocess my music files and create the melspectrogram. Afterwards I used the 'get_tensor'-function from 'vismodel.py' as indicated in the the visualize_example.ipynb notebook. This leaves me with a torch.Size([1, 96, 256]).
When trying to run the model on this tensor, I get the following error: 'RuntimeError: Given input size: (8x11x256). Calculated output size: (8x0x256). Output size is too small'
Do you have any idea how to get this problem fixed? Thank you!
Hi,
Can you paste the code that you run and the entire error message, please?
Thanks for your reply!
This is the code I have used:
And here is the entire error message:
It looks like an issue with the input shape. Let's check the shape of the spectrogram. Can you let me know the shape of your spectrograms?
To be clearer, in this line (link), let's add one more line print(spec.shape)
to confirm the shape.