Before and after squeezing there is the same shape, before:
torch.Size([512])
and after:
torch.Size([512])
This is clear because there are not dimensions of size 1.
And the output size of my model3 is torch.Size([1, 2048])
Edit: labels_a and labels_b have torch.Size([512])
Then, there is a torch.cat of labels_a and labels_b and the new labels torch.Size([1024])