I am working on a project in which I have a loss like (w - wc)^2. w is the weight of the CNN that I’m training on, wc is the weight from the pre-trained network, is it possible for me to apply a L2 loss on these two weights in my loss? Will pytorch update w automatically? Thanks.