- Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels