torch.Size([32]) is a row vector and torch.Size([32, 1]) is a column vector. You can easily convert them:
a = torch.ones(32) # [32] row vector
b = a.view(a.shape[0], -1)  # make a [32, 1] column vector out of a

print(a.shape)
print(b.shape)
print(b.squeeze().shape) # make a row vector out of the column vector