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

Feature Request: Sequence Pooling with Stride #1608

Closed
lcy-seso opened this issue Mar 13, 2017 · 1 comment · Fixed by #2701
Closed

Feature Request: Sequence Pooling with Stride #1608

lcy-seso opened this issue Mar 13, 2017 · 1 comment · Fixed by #2701
Assignees

Comments

@lcy-seso
Copy link
Contributor

Problem:

  • Currently, sequence Pooling in PaddlePaddle is performed sequence-wise. After pooling, a sequence is transformed into a non-sequence.
  • This is not enough in building a deep one-dimensional convolution model, such as models for NLP or speech tasks, in which pooling layer may be followed by a new convolution layer.
  • According to current design, such a model is impossible, because output of pooling is no longer a sequence, that cannot be input to a new convolution layer.

It will be helpful if the sequence Pooling layer provides a stride parameter, which controls the scope of pooling operation.

It may work like this:

  • If stride is set -1, it equals to sequence-wise pooling as it does now, otherwise, pooling is performed upon a small local area.
  • After pooling with stride n (n is smaller than sequence length), a long sequence will be shorten.
@luotao1 luotao1 self-assigned this Mar 13, 2017
@luotao1
Copy link
Contributor

luotao1 commented Mar 13, 2017

@lcy-seso 讨论后,目前会优先支持AverageLayer、MaxLayer和SequenceLastInstanceLayer,这三个单层的功能。

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.

2 participants