Hello everybody,
I made a learner from filenames:
data = DataBlock(blocks = (ImageBlock, CategoryBlock),
get_items=get_image_files,
splitter=RandomSplitter(seed=42),
get_y=using_attr(RegexLabeller(pat), 'name'),
item_tfms=Resize(512),
batch_tfms=aug_transforms(size=224, flip_vert=True, max_rotate=360.0, min_zoom=1, max_zoom=1, p_affine =1, pad_mode='border'))
dls = data.dataloaders(path_img)
learn = cnn_learner(dls, resnet34, metrics=accuracy)
Now, I want to print the predictions, labels, and filenames of the validation set. I think preds, labels = learn.get_preds(1)
retrieves the predictions and labels of the validation set. Am I right? And how can I retrieve the corresponding filenames?
Thank you for your help!
Best,
Felix