I am confused about how back propagation is implemented in Siamese networks if the sister networks share the same weights. How are these common weights updated based on the loss calculated i.e. in what sequence will the weights be updated , to adjust the contribution of different paths?

Can someone explain or provide a reference where I can read about it?