Hey,
A torch.Size([3]) is just the batch size that you are passing through. So, to elaborate a bit more torch.Size([3, 100, 224, 224]) - 4 dimension
3 - is batch size
100 - is the number of channels
224, 224, - image (w, h)
Exactly, your target should be torch.Size([3, 224, 224]).
Take a look at the documentation of the CE loss for further refrence.
A small example
outputs = torch.rand(3, 100, 224, 224).float() # ex: outputs = model(input)
targets = torch.rand(3, 224, 224).long() # try to change it to torch.rand(3) and see

criterion = torch.nn.CrossEntropyLoss()
loss = criterion(input, targets)
print(loss)