-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
【不兼容升级】移除paddle.nn.functional.diag_embed,添加paddle.diag_embed并支持作为类方法 #58223
【不兼容升级】移除paddle.nn.functional.diag_embed,添加paddle.diag_embed并支持作为类方法 #58223
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
should delete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,请同步提供中文文档
…addlePaddle#58223) * remove_diag_embed_to_creation * remove_diag_embed_to_creation * Update __init__.py * Incompatible upgrade * fix_bugs * add_deprecated * remove diag_embed from __all__
…addlePaddle#58223) * remove_diag_embed_to_creation * remove_diag_embed_to_creation * Update __init__.py * Incompatible upgrade * fix_bugs * add_deprecated * remove diag_embed from __all__
…addlePaddle#58223) * remove_diag_embed_to_creation * remove_diag_embed_to_creation * Update __init__.py * Incompatible upgrade * fix_bugs * add_deprecated * remove diag_embed from __all__
PR types
Others
PR changes
APIs
Description
Pcard-73263
diag_embed是一种使用频率较高的创建方法,需要支持Paddle/Tensor.diag_embed的调用形式。简单实现办法是在tensor_match_methods.py文件中import该函数将其作为Tensor类方法,但此时会遇到import循环依赖的问题(解决成本较高,也无必要)。目前与其属于同类的的diag、diagflat、diagonal API被放置在paddle/tensor/creation.py中。现在将diag_embed函数的实现迁移到同类API所在的creation.py文件中,而在原实现位置调用,并做废弃警告处理。