How do I get the file paths corresponding to the top losses. I tried using the code suggested in Lesson 2:
losses,idxs = interp.top_losses(10)
for p in data.valid_ds.x[idxs]:
But the type of “p” is class ‘fastai.vision.image.Image’ which contains the actual pixels. I can’t figure out a way to get the path of the file from it.
My data set is audio files which I’ve converted to spectrograms, so rather than showing the top losses, I’d like to listen to the top losses, for which I need to get the file name change the extension and then listen to it.