Solved by SimonW in post #2 
              
              
                Yes! It’s kind of hidden, but here you go: 
>>> mat = Variable(torch.randn(3, 4))
>>> res = Variable(torch.zeros(3, 4, 4))
>>> res.as_strided(mat.size(), [res.stride(0), res.size(2) + 1]).copy_(mat)
Variable containing:
 0.0422  0.0896  1.4919 -0.7167
-2.4854  0.3412 -1.4421 -0.5081
-0.6238  0.2446 …