kerasadf.layers.pooling.AveragePooling1D¶
- class kerasadf.layers.pooling.AveragePooling1D(pool_size=2, strides=None, padding='valid', data_format=None, **kwargs)¶
Bases:
Pooling1D
Average pooling layer for 1D inputs.
Assumed Density Filtering (ADF) version of
keras.layers.AveragePooling1D
.- Parameters:
- pool_size
int
ortuple
ofint
An integer or tuple/list of a single integer, representing the size of the pooling window. Default is 2.
- strides
int
ortuple
ofint
orNone
, optional An integer or tuple/list of a single integer, specifying the strides of the pooling operation. If
None
, thepool_size
will be used. Default isNone
.- padding{“valid”, “same”}, optional
The padding method. Case-insensitive. Default is “valid”.
- data_format{“channels_last”, “channels_first”}, optional
The ordering of the dimensions in the inputs. “channels_last” corresponds to inputs with shape
(batch, steps, features)
while “channels_first” corresponds to inputs with shape(batch, features, steps)
. It defaults to theimage_data_format
value found in your Keras config file at~/.keras/keras.json
. If you never set it, then it will be “channels_last”.
- pool_size
Notes
- Input shape
3D tensor with shape
(batch_size, steps, features)
ifdata_format
is “channels_last” or shape(batch_size, features, steps)
ifdata_format
is “channels_first”.- Output shape
3D tensor with shape
(batch_size, pooled_steps, features)
ifdata_format
is “channels_last” or shape(batch_size, features, pooled_steps)
ifdata_format
is “channels_first”.
- call(inputs)¶