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

[BugFix] Fix load ckpt weight for amp 02 #2479

Merged
merged 3 commits into from
Jun 15, 2022

Conversation

ZHUI
Copy link
Collaborator

@ZHUI ZHUI commented Jun 10, 2022

PR types

Bug fixes

PR changes

Models

Description

Fix load ckpt weight for amp 02

在 amp-o2功能开发过程中,为了支持指定网络存储数据类型的功能,添加state_dict hook功能,但是在Layer的set_state_dict是通过state_dict获取网络参数并加载的,hook接口的存在导致 set_state_dict无法加载到原本网络参数。

导致参数加载出现问题。本PR不再使用 save_dtype 选项。

PaddlePaddle/Paddle#43407

@wawltor wawltor self-requested a review June 14, 2022 06:38
@wawltor wawltor self-assigned this Jun 14, 2022
@wawltor wawltor added the bug Something isn't working label Jun 14, 2022
Copy link
Collaborator

@wawltor wawltor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ZHUI ZHUI merged commit e135626 into PaddlePaddle:develop Jun 15, 2022
@ZHUI ZHUI deleted the fix_ernie_ckpt branch June 15, 2022 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants