Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模型参数自动更新 #12090

Closed
ningerlove opened this issue May 10, 2024 · 1 comment
Closed

模型参数自动更新 #12090

ningerlove opened this issue May 10, 2024 · 1 comment
Assignees

Comments

@ningerlove
Copy link

训练文本识别模型发现,即使 不进行 optimizer.step() ,模型参数也会发生改变,加上with paddle.no_grad(),模型参数才不会改变,这是为啥

@zhangyubo0722
Copy link
Collaborator

使用with paddle.no_grad()会冻结网络,即不计算梯度,也不会进行反向传播

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants