Hey guy, I was trying to implement image classification on a custom dataset.
I used the below function for getting the data loaders:
def get_dls(bs, size): dblock = DataBlock(blocks=(ImageBlock, CategoryBlock), get_items=get_image_files, get_y=parent_label, splitter = TrainTestSplitter(test_size=0.2, random_state=0), item_tfms=Resize(224), batch_tfms=[*aug_transforms(mult=1.0, size=size,min_scale=1.0, max_warp=0, max_rotate=0), Normalize.from_stats(*imagenet_stats)]) return dblock.dataloaders(path_images, bs=bs)
This has worked for me before, but for some reason, when I try to predict something with this,
the output is like:
I understand that if I take the argmax of the second and third tensors, I’ll get the index of my predicted class, but this does not normally happen, right?