@@ -6548,26 +6548,27 @@ def switch_order_layer(input,
6548
6548
@layer_support ()
6549
6549
def crop_layer (input , offset , axis = 2 , shape = None , name = None , layer_attr = None ):
6550
6550
"""
6551
- This layer crops images by offset and shape. User can set crop shape by
6552
- args 'shape' explicitly or by reference input layer.
6551
+ This layer crops images according to the offset and shape. Users can set
6552
+ the crop shape through the argument 'shape' explicitly or by specifying a
6553
+ reference input layer.
6553
6554
6554
6555
The example usage is:
6555
6556
6556
6557
.. code-block:: python
6557
6558
crop = crop_layer(input=[image_input, reference_input], axis=2, offset=[2, 3])
6558
6559
6559
- :param input: The input of this layer. If two inputs are given, the second input
6560
- will be regarded as reference input .
6560
+ :param input: The input of this layer. If two inputs are given, the second one
6561
+ will be regarded as the reference .
6561
6562
:type input: LayerOutput | Sequence
6562
6563
:param offset: The crop offset.
6563
6564
:type offset: Sequence
6564
- :param axis: start axis to be cropped. To image input layer:
6565
+ :param axis: The start axis to be cropped. For image input layer:
6565
6566
- 0: batch size
6566
6567
- 1: channels
6567
6568
- 2: height
6568
6569
- 3: width
6569
- :type partial_sum : int
6570
- :param shape: The shape to be cropped. Default is None.
6570
+ :type axis : int
6571
+ :param shape: The shape to be cropped to . Default is None.
6571
6572
:type shape: Sequence | None
6572
6573
:param name: The name of this layer. It is optional.
6573
6574
:type name: basestring
@@ -6702,9 +6703,9 @@ def seq_slice_layer(input, starts, ends, name=None):
6702
6703
:type name: basestring
6703
6704
:param input: The input of this layer, which should be a sequence.
6704
6705
:type input: LayerOutput
6705
- :param starts: start indices to slice the input sequence.
6706
+ :param starts: The start indices to slice the input sequence.
6706
6707
:type starts: LayerOutput | None
6707
- :param ends: end indices to slice the input sequence.
6708
+ :param ends: The end indices to slice the input sequence.
6708
6709
:type ends: LayerOutput | None
6709
6710
:return: LayerOutput object.
6710
6711
:rtype: LayerOutput
@@ -6744,7 +6745,7 @@ def seq_slice_layer(input, starts, ends, name=None):
6744
6745
@layer_support ()
6745
6746
def kmax_seq_score_layer (input , name = None , beam_size = 1 ):
6746
6747
"""
6747
- This layer accepts one input which are scores over a sequence or a nested
6748
+ This layer accepts one input which is scores over a sequence or a nested
6748
6749
sequence, and returns indices of beam_size sequences with highest scores.
6749
6750
6750
6751
.. code-block:: python
@@ -6754,11 +6755,11 @@ def kmax_seq_score_layer(input, name=None, beam_size=1):
6754
6755
6755
6756
:param name: The name of this layer. It is optional.
6756
6757
:type name: basestring
6757
- :param input: The input of this layer. It stores scores over a sequence or a nested
6758
- sequence and its size must be 1.
6758
+ :param input: The input of this layer. It stores scores over a sequence or
6759
+ a nested sequence and its size must be 1.
6759
6760
:type input: LayerOutput
6760
- :param beam_size: sequence indices with top beam_size scores are returned.
6761
- :type beam_size: double
6761
+ :param beam_size: The indices of the sequences with top beam_size scores are returned.
6762
+ :type beam_size: int
6762
6763
:return: LayerOutput object.
6763
6764
:rtype: LayerOutput
6764
6765
"""
@@ -6814,38 +6815,42 @@ def img_conv3d_layer(input,
6814
6815
:type name: basestring
6815
6816
:param input: The input of this layer.
6816
6817
:type input: LayerOutput
6817
- :param filter_size: The x dimension of a filter kernel. Or input a list.
6818
+ :param filter_size: The dimensions of the filter kernel along three axises. If the parameter
6819
+ is set to one integer, the three dimensions will be same.
6818
6820
:type filter_size: int | tuple | list
6819
- :param num_filters: Each filter group's number of filter
6821
+ :param num_filters: The number of filters in each group.
6822
+ :type num_filters: int
6820
6823
:param act: Activation type. ReluActivation is the default.
6821
6824
:type act: BaseActivation
6822
- :param groups: Group size of filters .
6825
+ :param groups: The number of the filter groups .
6823
6826
:type groups: int
6824
- :param stride: The x dimension of the stride. Or input a tuple for two image
6825
- dimension .
6827
+ :param stride: The strides of the convolution along three axises. If the parameter
6828
+ is set to one integer, the three strides will be same .
6826
6829
:type stride: int | tuple | list
6827
- :param padding: The x dimension of the padding. Or input a tuple for two
6828
- image dimension
6830
+ :param padding: The numbers of padding along three axises. If the parameter is set to
6831
+ one integer, they will be same.
6829
6832
:type padding: int | tuple | list
6830
- :param bias_attr: Convolution bias attribute. None means default bias.
6831
- False means no bias.
6833
+ :param bias_attr: The Bias Attribute. If the parameter is set to
6834
+ False or something not type of ParameterAttribute,
6835
+ no bias is defined. If the parameter is set to
6836
+ True, the bias is initialized to zero.
6832
6837
:type bias_attr: ParameterAttribute | None | bool | Any
6833
- :param num_channels: number of input channels. If None will be set
6834
- automatically from previous output.
6838
+ :param num_channels: The number of input channels. If the parameter is not set or
6839
+ set to None, its actual value will be automatically set to
6840
+ the channels number of the input .
6835
6841
:type num_channels: int
6836
- :param param_attr: Convolution param attribute. None means default attribute
6842
+ :param param_attr: The parameter attribute of the convolution.
6837
6843
:type param_attr: ParameterAttribute
6838
- :param shared_biases: Is biases will be shared between filters or not.
6844
+ :param shared_biases: Whether biases will be shared between filters or not.
6839
6845
:type shared_biases: bool
6840
- :param layer_attr: Layer Extra Attribute .
6846
+ :param layer_attr: Extra layer attributes .
6841
6847
:type layer_attr: ExtraLayerAttribute
6842
- :param trans: true if it is a convTransLayer, false if it is a convLayer
6848
+ :param trans: True if it is a convTransLayer, False if it is a convLayer
6843
6849
:type trans: bool
6844
- :param layer_type: specify the layer_type, default is None. If trans=True,
6845
- layer_type has to be "exconvt" or "cudnn_convt",
6846
- otherwise layer_type has to be either "exconv" or
6847
- "cudnn_conv"
6848
- :type layer_type: String
6850
+ :param layer_type: Specify the layer_type. If the parameter is set, it must be "deconv3d"
6851
+ when trans=True. If not set, it will be automatically set to "deconv3d"
6852
+ when trans=True and "conv3d" when trans=False.
6853
+ :type layer_type: basestring
6849
6854
:return: LayerOutput object.
6850
6855
:rtype: LayerOutput
6851
6856
"""
@@ -6927,7 +6932,7 @@ def img_conv3d_layer(input,
6927
6932
def scale_shift_layer (input , name = None , param_attr = None , bias_attr = None ):
6928
6933
"""
6929
6934
A layer applies a linear transformation to each element in each row of
6930
- the input matrix. For each element, the layer first re-scale it and then
6935
+ the input matrix. For each element, the layer first re-scales it and then
6931
6936
adds a bias to it.
6932
6937
6933
6938
This layer is very like the SlopeInterceptLayer, except the scale and
@@ -7001,12 +7006,12 @@ def sub_seq_layer(input, offsets, sizes, act=None, bias_attr=None, name=None):
7001
7006
:type name: basestring
7002
7007
:param input: The input of this layer, which should be sequence.
7003
7008
:type input: LayerOutput
7004
- :param offsets: offset indices to slice the input sequence, which should be
7005
- sequence type.
7009
+ :param offsets: The offset indices to slice the input sequence, which should
7010
+ be sequence type.
7006
7011
:type offsets: LayerOutput
7007
- :param sizes: sizes of the sub-sequences, which should be sequence type.
7012
+ :param sizes: The sizes of the sub-sequences, which should be sequence type.
7008
7013
:type sizes: LayerOutput
7009
- :param act: Layer activation, default is LinearActivation
7014
+ :param act: Activation type, LinearActivation is the default.
7010
7015
:type act: BaseActivation.
7011
7016
:param bias_attr: The Bias Attribute. If the parameter is set to
7012
7017
False or something not type of ParameterAttribute,
0 commit comments