I am getting the following error:
Background:
Each image is associated with 14 labels, with a batch size of 4.
So the size of labels is (4,14)
But when i get the predictions each image will have a single class prediction.
So the size of preds is(4,)
So how shall I rectify the following error.
running_corrects += torch.sum(preds == labels.data) RuntimeError: The size of tensor a (4) must match the size of tensor b (14) at non-singleton dimension 1