I don’t think you’ve solved the issue as you are now running out of GPU memory instead of system RAM.
torch.repeat expects to get the factors which are used to multiply the size to get the output tensor.
Based on the initial description you should use a.repeat(1, 2, 1, 1).