maybe, it consider unsqueezed shape, for example,
x = torch.tensor([1, 2, 3])
x.shape

give
torch.Size([3])

when we do,
x.repeat(4,2)

then,
it consider x shape to be
torch.size([1, 3])

and repeat this tensor 4 times along the 1st dim, 2 times along the 2nd dim, resulting in output shape to be,
torch.size([4, 6])

when we do,
x.repeat(4, 2, 1)

then, the unsqueezed shape of x be,
torch.size([1, 1, 3])

and repeat this tensor 4 times along the 1st dim, 2 times along the 2nd dim, 1 time along the 3rd dim, resulting in output shape to be,
torch.size([4, 2, 3])