|
|
|
@ -2589,7 +2589,7 @@ def img_pool_layer(input,
|
|
|
|
|
|
|
|
|
|
assert type(pool_type) in [AvgPooling, MaxPooling, CudnnAvgPooling,
|
|
|
|
|
CudnnMaxPooling], \
|
|
|
|
|
"only AvgPooling and MaxPooling are supported"
|
|
|
|
|
"only (Cudnn)AvgPooling, (Cudnn)MaxPooling are supported"
|
|
|
|
|
|
|
|
|
|
if pool_type is None:
|
|
|
|
|
pool_type = MaxPooling()
|
|
|
|
@ -6236,11 +6236,11 @@ def kmax_sequence_score_layer(input, name=None, beam_size=1):
|
|
|
|
|
@wrap_bias_attr_default()
|
|
|
|
|
def scale_shift_layer(input, name=None, param_attr=None, bias_attr=None):
|
|
|
|
|
"""
|
|
|
|
|
A layer applies a linear transformation to each element in each row of
|
|
|
|
|
the input matrix. For each element, the layer first re-scale it and then
|
|
|
|
|
A layer applies a linear transformation to each element in each row of
|
|
|
|
|
the input matrix. For each element, the layer first re-scale it and then
|
|
|
|
|
adds a bias to it.
|
|
|
|
|
|
|
|
|
|
This layer is very like the SlopeInterceptLayer, except the scale and
|
|
|
|
|
This layer is very like the SlopeInterceptLayer, except the scale and
|
|
|
|
|
bias are trainable.
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
|