ClassificationInterpretation Problem


I have a problem that I can not figure it how to solve it. The example is mostly based on the lesson3 planet notebook.

Data is read from csv using src and databunch (looks ok when visualizing it). It is a 3 class image classification problem.

src = (ImageList.from_csv(path, ‘train_split_v2.csv’)
data = (src.transform(tfms, size=128, resize_method=ResizeMethod.SQUISH)
data.batch_size = bs

Learner seems to learn something (90% accuracy)

arch = models.resnet34
acc_02 = partial(accuracy_thresh, thresh=0.2)
f_score = partial(fbeta, thresh=0.2)
learn = cnn_learner(data, arch, metrics=[acc_02, f_score])
learn.fit_one_cycle(1, slice(lr))

The problems comes when I want to interpret the results

interp = ClassificationInterpretation.from_learner(learn)
losses,idxs = interp.top_losses()

This returns false, the size of losses and idxs are 3x the size of valid (3339 10017 10017). Then all plot-all_losses, confusion matrix numbers do not match valid and do not make much sense for a 90% accuracy of the model.

I am sure I am missing something, but can’t figure it. Thansk for any tips and help!