Solved by ptrblck in post #2 
              
              
                You could index the tensor with None to add additional dimensions: 
x = torch.randn(10)
y = x[None, :, None, None]
print(y.shape)
> torch.Size([1, 10, 1, 1])