Initialize a network which is a sub-network of another

Hello,

I have a network say net1, which is a sub-network of another network say net12 (say net12 = net1 + net2; net1 and net2 are connected together)

I have a pre-trained model for net12, so I would like to initialize net1 using the corresponding net1’s weights in net12. Can anyone please help me with this?

I know this problem actually corresponds to transfer learning, but I am a newbie, so I do not have a lot of experience with either PyTorch or Deep Learning. Any help will be much appreciated!