Hi,



 arpitdm:

can I define an optimizer_f w.r.t to features and not model.parameters() , and correspondingly compute loss_train.backward() , perform an optimizer_f.step() ?


Yes you can do that, and here 61 is a small example from docs. You can pass the parameter (you want to update) to the optimizer, and others will fixed when you call optimizer_f.step().