[NNAdapter][Ascend] Support transformer model#8594
Merged
hong19860320 merged 5 commits intoPaddlePaddle:developfrom Mar 22, 2022
Merged
[NNAdapter][Ascend] Support transformer model#8594hong19860320 merged 5 commits intoPaddlePaddle:developfrom
hong19860320 merged 5 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
| final_shape.resize(shape_tensor_vct.size()); | ||
| for (size_t i = 0; i < shape_tensor_vct.size(); i++) { | ||
| final_shape[i] = shape_tensor_vct[i]->data<int>()[0]; | ||
| if (shape_tensor_vct[i]->dims().empty()) { |
Collaborator
There was a problem hiding this comment.
是否有这种情况发生呢?理论上shape_tensor_vct中的tensor是不允许为空的,如果为空那么多半是模型的问题,尽量从模型上去解决比较好
Collaborator
Author
There was a problem hiding this comment.
这是transformer控制流模型出现的场景。确实会出现为空的情况。
0c5b07b to
f8517cf
Compare
f8517cf to
96888c2
Compare
This file contains hidden or 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
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.
No description provided.