torch.unsqueeze seems to add a batch dimension here but why doesn’t tensor.size() change?
>>> x = torch.Tensor([1,2,3,4])
>>> x
tensor([1., 2., 3., 4.])
>>> x.size()
torch.Size([4])
>>> torch.unsqueeze(x,0)
tensor([[1., 2., 3., 4.]])
>>> x.size()
torch.Size([4])