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

CopyLoDOp is needed. #9171

Closed
pkuyym opened this issue Mar 18, 2018 · 0 comments
Closed

CopyLoDOp is needed. #9171

pkuyym opened this issue Mar 18, 2018 · 0 comments

Comments

@pkuyym
Copy link
Contributor

pkuyym commented Mar 18, 2018

Sometimes we need set a LoDTensor's LoD by copying LoD from another LoDTensor. If the referred LoDTensor has more than one LoD level, the level range should be specified by attribute. If CopyLoDOp provided, we can view a common Tensor as a sequence by assigning a LoD information to it.

For example, beam_search operator requires that prev_ids, topk_indices, and topk_scores are all LoDTensor, however, LoD of topk_scores usually inherits from states, states sometimes is a common Tensor, since the init value is always Tensor. In this situation, we can copy LoD from prev_ids to topk_scores.

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

No branches or pull requests

1 participant