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

[cherry pick]layer to 'NoneType' object has no attribute 'place' (#43597) #43717

Merged

Conversation

zhangbo9674
Copy link
Contributor

@zhangbo9674 zhangbo9674 commented Jun 21, 2022

PR types

Bug fixes

PR changes

APIs

Describe

bug:
当class Layer的_buffers中有参数为None的时候,调用to()方法将会报layer to 'NoneType' object has no attribute 'place'的错误。
修复方法:
to()方法增加对_buffers中None类型参数的判断,如果为None,跳过该参数的处理。

@paddle-bot-old
Copy link

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@zhangbo9674 zhangbo9674 reopened this Jun 22, 2022
@lanxianghit lanxianghit merged commit 0b87931 into PaddlePaddle:release/2.3 Jun 22, 2022
@zhangbo9674 zhangbo9674 deleted the cp/fix_layer_to_none branch March 2, 2023 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants