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

LodExtend Operator #5000

Closed
Superjomn opened this issue Oct 22, 2017 · 0 comments · Fixed by #4740
Closed

LodExtend Operator #5000

Superjomn opened this issue Oct 22, 2017 · 0 comments · Fixed by #4740
Assignees

Comments

@Superjomn
Copy link
Contributor

Superjomn commented Oct 22, 2017

According to the design of sequence decoder,
a LodExtend Operator is needed to link the previous state to the current state of RNN/sequence decoder.

It functions like

  • inputs
    • source : LoDTensor
    • target, the lod to fit, LoDTensor
  • outputs
    • the expanded source that has the same LoD with target

Some real examples:

  • source: a 1-level LoDTensor with 2 sequences
    • LoD: [0, 3, 5]
    • data: [0, 1, 2, 3, 4, 5]
  • target: a 1-level LoDTensor with 5 sequences
    • LoD: [0, 2, 3, 5, 6, 6, 8]
  • output:
    • LoD same with target
    • data: [0, 0, 1, 2, 2, 3, 5, 5]

The function LodExpand in another PR can be used.

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

Successfully merging a pull request may close this issue.

3 participants