Yes, I agree. Here’s what I have;
  for image_batch, label_batch in train_dl:
    optimizer.zero_grad()

    pred_batch = model(image_batch.to(device))
    print(pred_batch.shape)
    print(label_batch.shape)

torch.Size([8, 5])
torch.Size([8])
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/loss.py:431: UserWarning: Using a target size (torch.Size([8])) that is different to the input size (torch.Size([8, 5])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
  return F.mse_loss(input, target, reduction=self.reduction)

RuntimeError: The size of tensor a (5) must match the size of tensor b (8) at non-singleton dimension 1