Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

怎么关闭某些参数的梯度更新

Open AWSWXY opened this issue 6 years ago • 5 comments

想咨询下如何关闭某些参数的更新,使用什么api

AWSWXY avatar Oct 13 '20 08:10 AWSWXY

param_attr中的learning_rate设置为0就可以了

wangchaochaohu avatar Oct 13 '20 08:10 wangchaochaohu

有没有相关的项目,模型 可以参考

AWSWXY avatar Oct 13 '20 08:10 AWSWXY

https://github.com/PaddlePaddle/models/blob/release/1.8/PaddleCV/gan/network/base_network.py#L55 可以参考下

wangchaochaohu avatar Oct 13 '20 08:10 wangchaochaohu

param_attr中的learning_rate设置为0就可以了

请问这么操作的话是不是只会影响这个被修改learning_rate的参数,网络中反向传播的梯度值、其他persistable参数的梯度与最终的更新值不变、与这个被修改的learning_rate无关?

starsblinking avatar Oct 16 '20 06:10 starsblinking

Since you haven't replied for more than a year, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. 由于您超过一年未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。

paddle-bot-old avatar Oct 27 '21 06:10 paddle-bot-old