I don’ know how to append model.parameters to optimizer when some condition is ok.
I just want to add model2.paramters().
so now I have wrote like this but not fancy.
How can make it clear?
Thanks for the quick reply !!
Is there any fancy way to express this?
for p in model1.parameters():
p.requires_grad = True
for p in model2.parameters():
p.requires_grad = True
for p in model3.parameters():
p.requires_grad = True