Hi.I am having a CNN with two CE losses (due to two separate datasets to be trainined simultaneously), each with an individual FC layer prior to the last CE entropy loss estimation.
What should I do if I want to freeze one of these losses, i.e. training only either one without removing any of them?


I have set the requires_grad of one end to be False.


Should I set the corresponding layers to the evaluation mode? and what about the gradient calculated for the one to be freezed, simply set it to be zero?


Thank you.