Interp.plot_top_losses: is heading backwards?

(Searched and didn’t find this asked…)

I’ve been going through the vision tutorial on Colab and I got to the part where it runs interp.plot_losseses() on the dog & cat breeds.

The heading says "Prediction/Actual/Loss/Probability’,…but should it read “Actual/Prediction” instead? See screenshot below.

The image in the top left is in fact a beagle, not a basset hound. Similarly the bottom left looks more like than a birman than a siamese (given the hair length), and the bottom middle is a boxer, not a saint bernard. (I’m not familiar enough with the other 3 breeds to comment – ok well I don’t know what a japanese chin is but the top middle is not a saint bernard, not even a saint bernard puppy.)

So, is the plot_top_losses heading reversed from it should be, or are (most of) these dataset labels actually wrong?

I tried checking the source, and…see “EDIT” below.

(I guess one other way to check would be to grab the index values for these images and check their labels, but I haven’t gotten far enough to know how to do that yet.)

EDIT: I tracked further into the source, and it looks like there, the target does in fact come before predicted:
for i,l in enumerate(["target", "predicted", "probabilities", "loss"]):

…i.e., the heading really is reversed from what it should be?

…The labels are wrong. The way I solved this was, I displayed & looked at every single file with “saint_bernard” in it…

    from IPython.display import Image
    import glob 
    files = glob.glob('/root/.fastai/data/oxford-iiit-pet/images/saint_bernard_*.jpg')
    for f in files:
        print(f"{f}:")
        display(Image(filename=f))

And found the above two images in the middle column and several others that were not saint bernards.

Makes sense that the ones with the wrong labels would produce the top losses!