I have trained a standard classification model (ResNet34) for 6 classes with good accuracy (~96% on validation).
When I check with the ClassificationInterpretation, I can see the results as a tensor containing values adding to 1.
However when shifting to inference with new data, I can see a complete different set of values. The following code gives the later tensor.
data = torch.reshape(transforms.Compose([transforms.ToTensor(), normalize])(data_numpy), (1, 3, 128, 192)).cuda()
results = learn.model(data)
tensor([[-4.1534, -8.2304, 12.5811, 2.6522, -2.0570, -2.4487]], device=‘cuda:0’)
Does anyone have an idea about what I am doing wrong ?