You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 thatprev_ids
,topk_indices
, andtopk_scores
are all LoDTensor, however, LoD oftopk_scores
usually inherits fromstates
,states
sometimes is a common Tensor, since the init value is always Tensor. In this situation, we can copy LoD fromprev_ids
totopk_scores
.The text was updated successfully, but these errors were encountered: