-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add eager string tensor #41039
Merged
joey12300
merged 13 commits into
PaddlePaddle:develop
from
joey12300:string_tensor_creator
Apr 15, 2022
Merged
Add eager string tensor #41039
joey12300
merged 13 commits into
PaddlePaddle:develop
from
joey12300:string_tensor_creator
Apr 15, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
你的PR提交成功,感谢你对开源项目的贡献! |
5055381
to
c48cf72
Compare
c48cf72
to
9d55fe3
Compare
af51e82
to
d49f6de
Compare
2249eef
to
1909f78
Compare
JiabinYang
approved these changes
Apr 13, 2022
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
joey12300
added a commit
to joey12300/Paddle
that referenced
this pull request
Apr 15, 2022
* Add core.eager.StringTensor __init__ which pyarray args can be passed * Add the numpy method of core.eager.StringTensor * revert tensor.to_string modification * Add ToPyObject for core.eager.StringTensor * Add debug string for core.eager.StringTensor * Remove place args of core.eager.StringTensor temporarily * Fix check string_tensor error * remove dtype of core.eager.StringTensor * add core.eager.StringTensor unittest * remove pstring from VarDesc * Add InitStringTensorWithStringTensor * Remove to_string modification * Remove zero_copy arg from StringTensor creator
phlrain
pushed a commit
that referenced
this pull request
Apr 18, 2022
* Add core.eager.StringTensor __init__ which pyarray args can be passed * Add the numpy method of core.eager.StringTensor * revert tensor.to_string modification * Add ToPyObject for core.eager.StringTensor * Add debug string for core.eager.StringTensor * Remove place args of core.eager.StringTensor temporarily * Fix check string_tensor error * remove dtype of core.eager.StringTensor * add core.eager.StringTensor unittest * remove pstring from VarDesc * Add InitStringTensorWithStringTensor * Remove to_string modification * Remove zero_copy arg from StringTensor creator
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
New features
PR changes
Others
Describe
接口描述
新增core.eager.StringTensor接口,目前主要添加了6个初始化方法以及numpy方法,结构如下:
core.eager.StringTensor的初始化方法接口设计参考core.eager.Tensor的接口,并根据StringTensor的需求删除了
dtype
,persistable
,stop_gradient
三个参数输入。目前StringTensor暂时只对外暴露CPU上的功能,所以在接口中也删除place
参数。至于zero_copy
参数,由于StringTensor的内存分布与numpy的string array内存分布不一致,无法直接使用numpy的string array初始化StringTensor,所以这里删除了zero_copy
。core.eager.StringTensor不支持使用FrameworkTensor初始化。使用示例