kkoutini / PaSST

Efficient Training of Audio Transformers with Patchout
Apache License 2.0
305 stars 50 forks source link

Wavmix for the ESC50 dataset #11

Open Jimmy2027 opened 2 years ago

Jimmy2027 commented 2 years ago

Hello, thanks a lot for you amazing work and for publishing the code!

I was trying to run the ex_esc50.py with wavmix=True but got the error:

RuntimeError: "nll_loss_forward_no_reduce_cuda_kernel_index" not implemented for 'Double'

since when using wavmix the ground truth is not an integer anymore.

Would it not be more appropriate to use the KL-divergence as loss function instead of the crossentropy?

kkoutini commented 2 years ago

Hi, Thank you! yes you can use loss functions that accept vectors instead of integers, Here is CE implementation.

For this to work you need to convert the targets from an integer to onehot vector here