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?
> if condition is ok:
> optimizer = optim.Adam(
>             list(model1.parameters()) +
>             list(model2.parameters()),
>             lr=0.001, betas=(0.9, 0.999))
else:
> optimizer = optim.Adam(
>             list(model1.parameters()) +
>             list(model2.parameters()) +
>             list(model3.parameters()),
>             lr=0.001, betas=(0.9, 0.999))