You don’t need to deepcopy here. Just assign x to another variable and add it later.
Have a look at the torchvision implementation 48.
Also you are reusing the nn.BatchNorm layer, which is most likely not the best idea.