If you would like to implement skip connections in the same way they are used in ResNet-like models, I would recommend to take a look at the torchvision implementation of ResNet 1.3k.
Your code looks generally alright assuming you are concerned about x4_2 + x4_1.