提交 e7b071f3 编写于 作者: L Luo Tao

update annotation with comments

上级 3b073fdc
...@@ -25,6 +25,10 @@ namespace paddle { ...@@ -25,6 +25,10 @@ namespace paddle {
* If SequenceLevel = kNonSeq: * If SequenceLevel = kNonSeq:
* Output: output size is the number of input sequences (NOT input instances) * Output: output size is the number of input sequences (NOT input instances)
* output[i] = average_{for each instance in this sequence}{input[i]} * output[i] = average_{for each instance in this sequence}{input[i]}
* If stride_ > 0:
* Output: a shorten sequence. Stride is the step size by which we slide a
* window upon the input sequence, and the average pooling
* operation is then applied to each interval independently.
* If SequenceLevel = kSeq: * If SequenceLevel = kSeq:
* Check input sequence must has sub-sequence * Check input sequence must has sub-sequence
* Output: output size is the number of input sub-sequences * Output: output size is the number of input sub-sequences
......
...@@ -27,10 +27,9 @@ namespace paddle { ...@@ -27,10 +27,9 @@ namespace paddle {
* Output: output size is the number of input sequences (NOT input instances) * Output: output size is the number of input sequences (NOT input instances)
* output[i] = max_{for each instance in this sequence}{input[i]} * output[i] = max_{for each instance in this sequence}{input[i]}
* If stride_ > 0: * If stride_ > 0:
* Output: a shorten sequence. The operation of getting max instance of a * Output: a shorten sequence. Stride is the step size by which we slide a
* sequence is independently performed on every slice of the input * window upon the input sequence, and the max pooling operation is
* sequence, which is obtained by sliding a window with the window * then applied to each interval independently.
* size set to stride_.
* If SequenceLevel = kSeq: * If SequenceLevel = kSeq:
* Check input sequence must has sub-sequence * Check input sequence must has sub-sequence
* Output: output size is the number of input sub-sequences * Output: output size is the number of input sub-sequences
......
...@@ -26,10 +26,9 @@ namespace paddle { ...@@ -26,10 +26,9 @@ namespace paddle {
* If SequenceLevel = kNonseq: * If SequenceLevel = kNonseq:
* Output: a sequence containing only the last instance of the input sequence * Output: a sequence containing only the last instance of the input sequence
* If stride_ > 0: * If stride_ > 0:
* Output: a shorten sequence. The operation of getting last instance of a * Output: a shorten sequence. Stride is the step size by which we slide a
* sequence is independently performed on every slice of the input * window upon the input sequence, and getting last instance
* sequence, which is obtained by sliding a window with the window * operation is then applied to each interval independently.
* size set to stride_.
* If SequenceLevel = kSeq: * If SequenceLevel = kSeq:
* Check input sequence must has sub-sequence * Check input sequence must has sub-sequence
* Output: a sequence containing only the last instance of each sub-sequence * Output: a sequence containing only the last instance of each sub-sequence
......
...@@ -28,8 +28,9 @@ namespace paddle { ...@@ -28,8 +28,9 @@ namespace paddle {
* sequence}{input[i]} * sequence}{input[i]}
* If stride_ > 0: * If stride_ > 0:
* Check input sequence must not have sub-sequence * Check input sequence must not have sub-sequence
* Output: a shorten sequence, pooling is performed upon a small local * Output: a shorten sequence. Stride is the step size by which we slide
* area * a window upon the input sequence, and the pooling operation
* is then applied to each interval independently.
* If SequenceLevel = kSeq: * If SequenceLevel = kSeq:
* Check input sequence must has sub-sequence * Check input sequence must has sub-sequence
* Output: output size is the number of input sub-sequences * Output: output size is the number of input sub-sequences
......
...@@ -1097,7 +1097,10 @@ def pooling_layer(input, ...@@ -1097,7 +1097,10 @@ def pooling_layer(input,
If stride > 0, this layer slides a window whose size is determined by stride, 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 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 will be shorten.
The parameter stride specifies the intervals at which to apply the pooling
operation. Note that for sequence with sub-sequence, the default value
of stride is -1. of stride is -1.
The example usage is: The example usage is:
...@@ -1118,7 +1121,7 @@ def pooling_layer(input, ...@@ -1118,7 +1121,7 @@ def pooling_layer(input,
:param pooling_type: Type of pooling, MaxPooling(default), AvgPooling, :param pooling_type: Type of pooling, MaxPooling(default), AvgPooling,
SumPooling, SquareRootNPooling. SumPooling, SquareRootNPooling.
:type pooling_type: BasePoolingType|None :type pooling_type: BasePoolingType|None
:param stride: window size. :param stride: The step size between successive pooling regions.
:type stride: Int :type stride: Int
:param bias_attr: Bias parameter attribute. False if no bias. :param bias_attr: Bias parameter attribute. False if no bias.
:type bias_attr: ParameterAttribute|None|False :type bias_attr: ParameterAttribute|None|False
...@@ -1408,7 +1411,7 @@ def last_seq(input, ...@@ -1408,7 +1411,7 @@ def last_seq(input,
:type name: basestring :type name: basestring
:param input: Input layer name. :param input: Input layer name.
:type input: LayerOutput :type input: LayerOutput
:param stride: window size. :param stride: The step size between successive pooling regions.
:type stride: Int :type stride: Int
:param layer_attr: extra layer attributes. :param layer_attr: extra layer attributes.
:type layer_attr: ExtraLayerAttribute. :type layer_attr: ExtraLayerAttribute.
...@@ -1464,7 +1467,7 @@ def first_seq(input, ...@@ -1464,7 +1467,7 @@ def first_seq(input,
:type name: basestring :type name: basestring
:param input: Input layer name. :param input: Input layer name.
:type input: LayerOutput :type input: LayerOutput
:param stride: window size. :param stride: The step size between successive pooling regions.
:type stride: Int :type stride: Int
:param layer_attr: extra layer attributes. :param layer_attr: extra layer attributes.
:type layer_attr: ExtraLayerAttribute. :type layer_attr: ExtraLayerAttribute.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册