@@ -888,7 +888,7 @@ def mixed_layer(size=0,
888
888
:type size: int
889
889
:param input: The input of this layer. It is an optional parameter. If set,
890
890
then this function will just return layer's name.
891
- :param act: Activation Type. LinearActivation is the default.
891
+ :param act: Activation Type. LinearActivation is the default activation .
892
892
:type act: BaseActivation
893
893
:param bias_attr: The bias attribute. If the parameter is set to False or an object
894
894
whose type is not ParameterAttribute, no bias is defined. If the
@@ -1030,7 +1030,7 @@ def fc_layer(input,
1030
1030
:type input: LayerOutput | list | tuple
1031
1031
:param size: The layer dimension.
1032
1032
:type size: int
1033
- :param act: Activation Type. TanhActivation is the default.
1033
+ :param act: Activation Type. TanhActivation is the default activation .
1034
1034
:type act: BaseActivation
1035
1035
:param param_attr: The Parameter Attribute|list.
1036
1036
:type param_attr: ParameterAttribute
@@ -1527,7 +1527,7 @@ def lstmemory(input,
1527
1527
:type input: LayerOutput
1528
1528
:param reverse: is sequence process reversed or not.
1529
1529
:type reverse: bool
1530
- :param act: Activation type. TanhActivation is the default. :math:`h_t`
1530
+ :param act: Activation type. TanhActivation is the default activation.
1531
1531
:type act: BaseActivation
1532
1532
:param gate_act: gate activation type, SigmoidActivation by default.
1533
1533
:type gate_act: BaseActivation
@@ -1920,7 +1920,7 @@ def repeat_layer(input,
1920
1920
False for treating input as column vector and repeating
1921
1921
in the row direction.
1922
1922
:type as_row_vector: bool
1923
- :param act: Activation type. IdentityActivation is the default.
1923
+ :param act: Activation type. IdentityActivation is the default activation .
1924
1924
:type act: BaseActivation
1925
1925
:type name: basestring
1926
1926
:param layer_attr: extra layer attributes.
@@ -1974,7 +1974,7 @@ def seq_reshape_layer(input,
1974
1974
:type reshape_size: int
1975
1975
:param name: The name of this layer. It is optional.
1976
1976
:type name: basestring
1977
- :param act: Activation type. IdentityActivation is the default.
1977
+ :param act: Activation type. IdentityActivation is the default activation .
1978
1978
:type act: BaseActivation
1979
1979
:param layer_attr: extra layer attributes.
1980
1980
:type layer_attr: ExtraLayerAttribute.
@@ -2487,7 +2487,7 @@ def img_conv_layer(input,
2487
2487
shape will be (filter_size, filter_size_y).
2488
2488
:type filter_size_y: int | None
2489
2489
:param num_filters: Each filter group's number of filter
2490
- :param act: Activation type. ReluActivation is the default.
2490
+ :param act: Activation type. ReluActivation is the default activation .
2491
2491
:type act: BaseActivation
2492
2492
:param groups: Group size of filters.
2493
2493
:type groups: int
@@ -3253,7 +3253,7 @@ def addto_layer(input, act=None, name=None, bias_attr=None, layer_attr=None):
3253
3253
:param input: Input layers. It could be a LayerOutput or list/tuple of
3254
3254
LayerOutput.
3255
3255
:type input: LayerOutput | list | tuple
3256
- :param act: Activation Type. LinearActivation is the default.
3256
+ :param act: Activation Type. LinearActivation is the default activation .
3257
3257
:type act: BaseActivation
3258
3258
:param bias_attr: The bias attribute. If the parameter is set to False or an object
3259
3259
whose type is not ParameterAttribute, no bias is defined. If the
@@ -3311,7 +3311,7 @@ def concat_layer(input, act=None, name=None, layer_attr=None, bias_attr=None):
3311
3311
:type name: basestring
3312
3312
:param input: input layers or projections
3313
3313
:type input: list | tuple | collections.Sequence
3314
- :param act: Activation type. IdentityActivation is the default.
3314
+ :param act: Activation type. IdentityActivation is the default activation .
3315
3315
:type act: BaseActivation
3316
3316
:param layer_attr: Extra Layer Attribute.
3317
3317
:type layer_attr: ExtraLayerAttribute
@@ -3406,7 +3406,7 @@ def seq_concat_layer(a, b, act=None, name=None, layer_attr=None,
3406
3406
:type a: LayerOutput
3407
3407
:param b: input sequence layer
3408
3408
:type b: LayerOutput
3409
- :param act: Activation type. IdentityActivation is the default.
3409
+ :param act: Activation type. IdentityActivation is the default activation .
3410
3410
:type act: BaseActivation
3411
3411
:param layer_attr: Extra Layer Attribute.
3412
3412
:type layer_attr: ExtraLayerAttribute
@@ -3572,7 +3572,7 @@ def lstm_step_layer(input,
3572
3572
...
3573
3573
3574
3574
3575
- This layer has two outputs. Default output is :math:`h_t`. The other
3575
+ This layer has two outputs. The default output is :math:`h_t`. The other
3576
3576
output is :math:`o_t`, whose name is 'state' and users can use
3577
3577
:code:`get_output_layer` to extract this output.
3578
3578
@@ -3583,13 +3583,15 @@ def lstm_step_layer(input,
3583
3583
:type size: int
3584
3584
:param input: The input of this layer.
3585
3585
:type input: LayerOutput
3586
- :param state: The state of a lstm .
3586
+ :param state: The state of the LSTM unit .
3587
3587
:type state: LayerOutput
3588
- :param act: Activation type. TanhActivation is the default.
3588
+ :param act: Activation type. TanhActivation is the default activation .
3589
3589
:type act: BaseActivation
3590
- :param gate_act: Activation type of the gate. SigmoidActivation is the default.
3590
+ :param gate_act: Activation type of the gate. SigmoidActivation is the
3591
+ default activation.
3591
3592
:type gate_act: BaseActivation
3592
- :param state_act: Activation type of the state. TanhActivation is the default.
3593
+ :param state_act: Activation type of the state. TanhActivation is the
3594
+ default activation.
3593
3595
:type state_act: BaseActivation
3594
3596
:param bias_attr: The bias attribute. If the parameter is set to False or an object
3595
3597
whose type is not ParameterAttribute, no bias is defined. If the
@@ -3648,12 +3650,13 @@ def gru_step_layer(input,
3648
3650
:param size: The dimension of this layer's output. If it is not set or set to None,
3649
3651
it will be set to one-third of the dimension of the input automatically.
3650
3652
:type size: int
3651
- :param act: Activation type of this layer's output. SigmoidActivation
3652
- is the default.
3653
+ :param act: Activation type of this layer's output. TanhActivation
3654
+ is the default activation .
3653
3655
:type act: BaseActivation
3654
3656
:param name: The name of this layer. It is optional.
3655
3657
:type name: basestring
3656
- :param gate_act: Activation type of this layer's two gates. Default is Sigmoid.
3658
+ :param gate_act: Activation type of this layer's two gates. SigmoidActivation is
3659
+ the default activation.
3657
3660
:type gate_act: BaseActivation
3658
3661
:param bias_attr: The bias attribute. If the parameter is set to False or an object
3659
3662
whose type is not ParameterAttribute, no bias is defined. If the
@@ -3707,10 +3710,10 @@ def gru_step_naive_layer(input,
3707
3710
param_attr = None ,
3708
3711
layer_attr = None ):
3709
3712
"""
3710
- GRU Step Layer, but using MixedLayer to generate . It supports ERROR_CLIPPING
3713
+ GRU Step Layer, which is realized using PaddlePaddle API . It supports ERROR_CLIPPING
3711
3714
and DROPOUT.
3712
3715
3713
- :param input: The input of this layer, whose dimension can be divided by 3.
3716
+ :param input: The input of this layer, whose dimensionality can be divided by 3.
3714
3717
:param output_mem: A memory which memorizes the output of this layer at previous
3715
3718
time step.
3716
3719
:type output_mem: LayerOutput
@@ -3719,11 +3722,11 @@ def gru_step_naive_layer(input,
3719
3722
:type size: int
3720
3723
:param name: The name of this layer. It is optional.
3721
3724
:type name: basestring
3722
- :param act: Activation type of this layer's output. SigmoidActivation
3723
- is the default.
3725
+ :param act: Activation type of this layer's output. TanhActivation
3726
+ is the default activation .
3724
3727
:type act: BaseActivation
3725
- :param gate_act: Activation type of this layer's two gates. TanhActivation
3726
- is the default.
3728
+ :param gate_act: Activation type of this layer's two gates. SigmoidActivation
3729
+ is the default activation .
3727
3730
:type gate_act: BaseActivation
3728
3731
:param bias_attr: The bias attribute. If the parameter is set to False or an object
3729
3732
whose type is not ParameterAttribute, no bias is defined. If the
@@ -3798,7 +3801,7 @@ def get_output_layer(input, arg_name, name=None, layer_attr=None):
3798
3801
:param input: The input layer. And this layer should contain
3799
3802
multiple outputs.
3800
3803
:type input: LayerOutput
3801
- :param arg_name: The name of the output of the input layer.
3804
+ :param arg_name: The name of the output to be extracted from the input layer.
3802
3805
:type arg_name: basestring
3803
3806
:param layer_attr: The extra layer attribute. See ExtraLayerAttribute for
3804
3807
details.
@@ -3858,7 +3861,7 @@ def recurrent_layer(input,
3858
3861
3859
3862
:param input: The input of this layer.
3860
3863
:type input: LayerOutput
3861
- :param act: Activation type. TanhActivation is the default.
3864
+ :param act: Activation type. TanhActivation is the default activation .
3862
3865
:type act: BaseActivation
3863
3866
:param bias_attr: The bias attribute. If the parameter is set to False or an object
3864
3867
whose type is not ParameterAttribute, no bias is defined. If the
@@ -3928,8 +3931,8 @@ def recurrent_group(step, input, reverse=False, name=None, targetInlink=None):
3928
3931
Recurrent layer group is an extremely flexible recurrent unit in
3929
3932
PaddlePaddle. As long as the user defines the calculation done within a
3930
3933
time step, PaddlePaddle will iterate such a recurrent calculation over
3931
- sequence input. This is extremely useful for attention-based models, or
3932
- Neural Turning Machine like models.
3934
+ sequence input. This is useful for attention-based models, or Neural
3935
+ Turning Machine like models.
3933
3936
3934
3937
The basic usage (time steps) is:
3935
3938
@@ -3951,9 +3954,8 @@ def step(input):
3951
3954
demo/seqToseq/seqToseq_net.py
3952
3955
- sequence steps: paddle/gserver/tests/sequence_nest_layer_group.conf
3953
3956
3954
- :param step: A step function which will be executed every step. The input
3955
- of this function is the input of the group. The return of
3956
- this function will be recurrent group's return value.
3957
+ :param step: A step function which takes the input of recurrent_group as its own
3958
+ input and returns values as recurrent_group's output every time step.
3957
3959
3958
3960
The recurrent group scatters a sequence into time steps. And
3959
3961
for each time step, it will invoke step function, and return
@@ -4251,8 +4253,8 @@ def rnn_step(input):
4251
4253
- machine translation : demo/seqToseq/translation/gen.conf \
4252
4254
demo/seqToseq/seqToseq_net.py
4253
4255
4254
- :param name: The name of the recurrent unit that generates sequences.
4255
- It is optional.
4256
+ :param name: The name of the recurrent unit that is responsible for
4257
+ generating sequences. It is optional.
4256
4258
:type name: basestring
4257
4259
:param step: A callable function that defines the calculation in a time
4258
4260
step, and it is applied to sequences with arbitrary length by
@@ -4386,7 +4388,7 @@ def square_error_cost(input,
4386
4388
mini-batch. It is optional.
4387
4389
:type weight: LayerOutput
4388
4390
:param coeff: The weight of the gradient in the back propagation.
4389
- 1.0 is the default.
4391
+ 1.0 is the default value .
4390
4392
:type coeff: float
4391
4393
:param layer_attr: The extra layer attribute. See ExtraLayerAttribute for
4392
4394
details.
@@ -4435,7 +4437,7 @@ def classification_cost(input,
4435
4437
details.
4436
4438
:type layer_attr: ExtraLayerAttribute
4437
4439
:param coeff: The weight of the gradient in the back propagation.
4438
- 1.0 is the default.
4440
+ 1.0 is the default value .
4439
4441
:type coeff: float
4440
4442
:return: LayerOutput object.
4441
4443
:rtype: LayerOutput
@@ -4878,7 +4880,7 @@ def tensor_layer(a,
4878
4880
:type b: LayerOutput
4879
4881
:param size: The dimension of this layer.
4880
4882
:type size: int
4881
- :param act: Activation type. LinearActivation is the default.
4883
+ :param act: Activation type. LinearActivation is the default activation .
4882
4884
:type act: BaseActivation
4883
4885
:param param_attr: The parameter attribute. See ParameterAttribute for
4884
4886
details.
@@ -4946,7 +4948,7 @@ def selective_fc_layer(input,
4946
4948
:param size: The dimension of this layer, which should be equal to that of
4947
4949
the layer 'select'.
4948
4950
:type size: int
4949
- :param act: Activation type. TanhActivation is the default.
4951
+ :param act: Activation type. TanhActivation is the default activation .
4950
4952
:type act: BaseActivation
4951
4953
:param pass_generation: The flag which indicates whether it is during generation.
4952
4954
:type pass_generation: bool
@@ -5498,7 +5500,7 @@ def crf_layer(input,
5498
5500
:param name: The name of this layer. It is optional.
5499
5501
:type name: basestring
5500
5502
:param coeff: The weight of the gradient in the back propagation.
5501
- 1.0 is the default.
5503
+ 1.0 is the default value .
5502
5504
:type coeff: float
5503
5505
:param layer_attr: The extra layer attribute. See ExtraLayerAttribute for
5504
5506
details.
@@ -5644,12 +5646,13 @@ def nce_layer(input,
5644
5646
:type weight: LayerOutput
5645
5647
:param num_classes: The number of classes.
5646
5648
:type num_classes: int
5647
- :param act: Activation type. SigmoidActivation is the default.
5649
+ :param act: Activation type. SigmoidActivation is the default activation .
5648
5650
:type act: BaseActivation
5649
5651
:param param_attr: The parameter attribute. See ParameterAttribute for
5650
5652
details.
5651
5653
:type param_attr: ParameterAttribute
5652
- :param num_neg_samples: The number of sampled negative labels. 10 is the default.
5654
+ :param num_neg_samples: The number of sampled negative labels. 10 is the
5655
+ default value.
5653
5656
:type num_neg_samples: int
5654
5657
:param neg_distribution: The discrete noisy distribution over the output
5655
5658
space from which num_neg_samples negative labels
@@ -5775,7 +5778,7 @@ def rank_cost(left,
5775
5778
:param name: The name of this layer. It is optional.
5776
5779
:type name: basestring
5777
5780
:param coeff: The weight of the gradient in the back propagation.
5778
- 1.0 is the default.
5781
+ 1.0 is the default value .
5779
5782
:type coeff: float
5780
5783
:param layer_attr: The extra layer attribute. See ExtraLayerAttribute for
5781
5784
details.
@@ -5886,7 +5889,7 @@ def cross_entropy(input,
5886
5889
:param name: The name of this layer. It is optional.
5887
5890
:type name: basestring
5888
5891
:param coeff: The weight of the gradient in the back propagation.
5889
- 1.0 is the default.
5892
+ 1.0 is the default value .
5890
5893
:type coeff: float
5891
5894
:param weight: The weight layer defines a weight for each sample in the
5892
5895
mini-batch. It is optional.
@@ -5934,7 +5937,7 @@ def cross_entropy_with_selfnorm(input,
5934
5937
:param name: The name of this layer. It is optional.
5935
5938
:type name: basestring
5936
5939
:param coeff: The weight of the gradient in the back propagation.
5937
- 1.0 is the default.
5940
+ 1.0 is the default value .
5938
5941
:type coeff: float
5939
5942
:param softmax_selfnorm_alpha: The scale factor affects the cost.
5940
5943
:type softmax_selfnorm_alpha: float
@@ -6024,7 +6027,7 @@ def huber_regression_cost(input,
6024
6027
:param delta: The difference between the observed and predicted values.
6025
6028
:type delta: float
6026
6029
:param coeff: The weight of the gradient in the back propagation.
6027
- 1.0 is the default.
6030
+ 1.0 is the default value .
6028
6031
:type coeff: float
6029
6032
:param layer_attr: The extra layer attribute. See ExtraLayerAttribute for
6030
6033
details.
@@ -6074,7 +6077,7 @@ def huber_classification_cost(input,
6074
6077
:param name: The name of this layer. It is optional.
6075
6078
:type name: basestring
6076
6079
:param coeff: The weight of the gradient in the back propagation.
6077
- 1.0 is the default.
6080
+ 1.0 is the default value .
6078
6081
:type coeff: float
6079
6082
:param layer_attr: The extra layer attribute. See ExtraLayerAttribute for
6080
6083
details.
@@ -6119,7 +6122,7 @@ def multi_binary_label_cross_entropy(input,
6119
6122
:param name: The name of this layer. It is optional.
6120
6123
:type name: basestring
6121
6124
:param coeff: The weight of the gradient in the back propagation.
6122
- 1.0 is the default.
6125
+ 1.0 is the default value .
6123
6126
:type coeff: float
6124
6127
:param layer_attr: The extra layer attribute. See ExtraLayerAttribute for
6125
6128
details.
@@ -6290,7 +6293,7 @@ def smooth_l1_cost(input, label, name=None, coeff=1.0, layer_attr=None):
6290
6293
:param name: The name of this layer. It is optional.
6291
6294
:type name: basestring
6292
6295
:param coeff: The weight of the gradient in the back propagation.
6293
- 1.0 is the default.
6296
+ 1.0 is the default value .
6294
6297
:type coeff: float
6295
6298
:param layer_attr: The extra layer attribute. See ExtraLayerAttribute for
6296
6299
details.
@@ -6442,7 +6445,7 @@ def row_conv_layer(input,
6442
6445
:param context_len: The context length equals the lookahead step number
6443
6446
plus one.
6444
6447
:type context_len: int
6445
- :param act: Activation Type. LinearActivation is the default.
6448
+ :param act: Activation Type. LinearActivation is the default activation .
6446
6449
:type act: BaseActivation
6447
6450
:param param_attr: The parameter attribute. See ParameterAttribute for
6448
6451
details.
@@ -6564,7 +6567,8 @@ def gated_unit_layer(input,
6564
6567
:type input: LayerOutput
6565
6568
:param size: The dimension of this layer's output.
6566
6569
:type size: int
6567
- :param act: Activation type of the projection. LinearActivation is the default.
6570
+ :param act: Activation type of the projection. LinearActivation is the default
6571
+ activation.
6568
6572
:type act: BaseActivation
6569
6573
:param name: The name of this layer. It is optional.
6570
6574
:type name: basestring
@@ -6945,7 +6949,7 @@ def img_conv3d_layer(input,
6945
6949
:type filter_size: int | tuple | list
6946
6950
:param num_filters: The number of filters in each group.
6947
6951
:type num_filters: int
6948
- :param act: Activation type. ReluActivation is the default.
6952
+ :param act: Activation type. ReluActivation is the default activation .
6949
6953
:type act: BaseActivation
6950
6954
:param groups: The number of the filter groups.
6951
6955
:type groups: int
@@ -7137,7 +7141,7 @@ def sub_seq_layer(input, offsets, sizes, act=None, bias_attr=None, name=None):
7137
7141
:type offsets: LayerOutput
7138
7142
:param sizes: The sizes of the sub-sequences, which should be sequence type.
7139
7143
:type sizes: LayerOutput
7140
- :param act: Activation type, LinearActivation is the default.
7144
+ :param act: Activation type, LinearActivation is the default activation .
7141
7145
:type act: BaseActivation.
7142
7146
:param bias_attr: The bias attribute. If the parameter is set to False or an object
7143
7147
whose type is not ParameterAttribute, no bias is defined. If the
0 commit comments