Solved by albanD in post #2 
              
              
                The following code shows you how to do it: 
a = torch.rand(3, 4)
b = torch.zeros(1, 4)

idx = 1
c = torch.cat([a[:idx], b, a[idx:]], 0)