kerasadf.layers.pooling.Pooling1D

class kerasadf.layers.pooling.Pooling1D(pool_function, pool_size, strides, padding='valid', data_format=None, **kwargs)

Bases: ADFLayer

Pooling layer for arbitrary pooling functions, for 1D inputs.

Assumed Density Filtering (ADF) version of the abstract Keras Pooling1D layer.

This class only exists for code reuse. It will never be an exposed API.

Parameters:
pool_functioncallable()

The pooling function to apply, e.g. tf.nn.max_pool2d.

pool_sizeint or tuple of int

An integer or tuple/list of a single integer, representing the size of the pooling window.

stridesint or tuple of int or None, optional

An integer or tuple/list of a single integer, specifying the strides of the pooling operation. If None, the pool_size will be used. Default is None.

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 the image_data_format value found in your Keras config file at ~/.keras/keras.json. If you never set it, then it will be “channels_last”.

call(inputs)
compute_output_shape(input_shape)
get_config()