Well you should not use loss_net.named_parameters() anymore. we override them. So you should “save” them before doing the first override. Like params = list(loss_net.named_parameters()) before the for-loop.
Then you can set them back (as leafs) when you want to make a new iteration. So maybe extract them as a state_dict and restore them with load_state_dict.