Thanks for the valuable explanation!
I gave MSELoss a try using the actual class counts as below:
criterion = torch.nn.MSELoss()
loss = criterion(output, target)

where
output = tensor([[-0.0272, -0.1516, -0.1283,  0.0954,  0.1588, -0.2674]], device='cuda:0', grad_fn=<AddmmBackward>)
target = tensor([[3., 0., 0., 0., 0., 1.]], device='cuda:0')
loss = tensor(1.8074, device='cuda:0', grad_fn=<MseLossBackward>)

The returned loss value after a complete epoch is nan probably because there was an order of magnitude difference in the output and target tensors. The output was obtained from a pre-trained VGG19 with the relu activations in linear layers (i.e. classifier part). What options do I have to get this network working?