In:
img.shape
Out:
torch.Size([1, 28, 28])
In:
img = images.unsqueeze(1)
In:
img.shape
Out:
torch.Size([4, 1, 1, 28, 28])
Can anyone pls tell me why .unsqueeze fauntion adds 2 dimentions?
batch size = 4