I want to set a particular layer of a sequential model to training mode, just at the before_epoch
event. I plan to use learn.model[1].training = True
and learn.model[1].requires_grad_(True)
(considering that the particular layer is learn.model[1]), at the before_epoch
event, and, then pass it as a callback. Is this correct ?
Please help
In case someone would require this :
Yes, it works, but, its better if we pass it at the before_train
event.