stride pooling for max and average layer#2701
Conversation
lcy-seso
left a comment
There was a problem hiding this comment.
Almost LGTM. Only need to refine the comments.
| * output[i] = max_{for each instance in this sequence}{input[i]} | ||
| * If stride_ > 0: | ||
| * Output: a shorten sequence. The operation of getting max instance of a | ||
| * sequence is independently performed on every slice of the input |
There was a problem hiding this comment.
- “getting max instance of a sequence” 这个表述令人困惑。
- Stride is the step size by which we slide a window upon the input sequence, and the pooling operation is then applied to each interval independently.
There was a problem hiding this comment.
Done. And update the comments in SequencePoolLayer.h, AverageLayer.h and SequenceLastInstanceLayer.h at the same time.
| :param pooling_type: Type of pooling, MaxPooling(default), AvgPooling, | ||
| SumPooling, SquareRootNPooling. | ||
| :type pooling_type: BasePoolingType|None | ||
| :param stride: window size. |
There was a problem hiding this comment.
stride --> the step size between successive pooling regions.
There was a problem hiding this comment.
Done, and update the comments in last_seq and first_seq at the same time.
| If stride > 0, this layer slides a window whose size is determined by stride, | ||
| and return the pooling value of the window as the output. Thus, a long sequence | ||
| will be shorten. Note that for sequence with sub-sequence, the default value | ||
| of stride is -1. |
There was a problem hiding this comment.
the parameter stride specifies the intervals at which to apply the pooling operation.
| If stride > 0, this layer slides a window whose size is determined by stride, | ||
| and return the pooling value of the window as the output. Thus, a long sequence | ||
| will be shorten. Note that for sequence with sub-sequence, the default value | ||
| of stride is -1. |
| :param pooling_type: Type of pooling, MaxPooling(default), AvgPooling, | ||
| SumPooling, SquareRootNPooling. | ||
| :type pooling_type: BasePoolingType|None | ||
| :param stride: window size. |
There was a problem hiding this comment.
Done, and update the comments in last_seq and first_seq at the same time.
| * output[i] = max_{for each instance in this sequence}{input[i]} | ||
| * If stride_ > 0: | ||
| * Output: a shorten sequence. The operation of getting max instance of a | ||
| * sequence is independently performed on every slice of the input |
There was a problem hiding this comment.
Done. And update the comments in SequencePoolLayer.h, AverageLayer.h and SequenceLastInstanceLayer.h at the same time.
fix #1608.
finish feature of "Sequence Pooling with Stride".