How can I update part of parameters in my models longer than others?

(叶帆帆(Fanfan Ye)) #1

I have two parts of parameters in my model, I want to backward one of them more than others, how can i do?
thanks in advance

(Alban D) #2


What do you mean by “more than others”? If you don’t want to optimize some parts of your net, you can create two optimizer, each containing de parameters for different part of your net and call .step() on each of them only when you want to update this part of the net.