fschmid56 / EfficientAT

This repository aims at providing efficient CNNs for Audio Tagging. We provide AudioSet pre-trained models ready for downstream training and extraction of audio embeddings.
MIT License
218 stars 41 forks source link

train problem #10

Closed zdj97 closed 1 year ago

zdj97 commented 1 year ago

when i run ex_audioset.py, there is a problem:

in line 111 : x,f,y,i=batch

problem: not enough values to unpack(expected4, got3)

I think the value i dose not have a value and I want to know how to use the teacher preds.

Thanks!

fschmid56 commented 1 year ago

Hi! batch should be a tuple of 4 elements: the waveform (x), the filename (f), the label (y), and the index (i). The index is added as long as you don't call the function _get_full_trainingset with _addindex=False.

However, I have recently added a file _fname_toindex.pkl that contains a python dict for converting the filename to the respective index position in the numpy array that stores the predictions. As long as you have the latest version of the code in this repo, this new version should be used automatically.

zdj97 commented 1 year ago

OK, Thanks! I will update the code.