If I am not mistaken you need the repeat function ? Here is an example:
a = torch.tensor([
                     [1., 2.]
                     [3., 4.]
                 ])
b = a.repeat([2, 1, 1]) # repeat twice
print(b)
tensor([[[1., 2.],
         [3., 4.]],

        [[1., 2.],
         [3., 4.]]])