Multi-label show_results on test data

Hi I’m working on Lesson3 multi-label prediction but struggling to make show_results work test data. I know this wasn’t the part of the original Lesson 3 notebook but I just want to visualize the predictions. The problem is described first and then the source code will follow.

show_results on the validation works as expected:

However, it behaves weird on the test data:

src = (ImageList.from_csv(path, 'data.csv', folder='train')
   .label_from_df(label_delim=' ')
data = (src.transform(get_transforms(), size=(128,128))

LabelList (25 items)
x: ImageList
Image (3, 128, 128),Image (3, 128, 128),Image (3, 128, 128),Image (3, 128, 128),Image (3, 128, 128)
y: EmptyLabelList
Path: /media/kra/TTera/dataset/spongebob_multi

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])
# and do some training...
1 Like