Skip to content

Feature Request: Sequence Pooling with Stride #1608

@lcy-seso

Description

@lcy-seso

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions