Depending on what you want.  The way of implementing a Siamese network which is a network with shared weights is defining one network but calling it twice.
If you check the graphical model you would be creating two nodes in parallel,  one pet calling.
This may not to be what you want to do,  since you may want pytorch to compute both independently.  Then,  you should stack both in a batch and did the forward pass and to split them