tf.layers.MaxPool2DLayer module

tf.layers.MaxPool2DLayer module

class tf.layers.MaxPool2DLayer.MaxPool2DLayer(*args: Any, **kwargs: Any)

Bases: modelzoo.common.tf.layers.BaseLayer.BaseLayer

Wrapper around the Keras 2D max pooling layer.

call(inputs, **kwargs)

Applies the 2D max pooling layer.

Parameters

inputs (Tensor) – A 4D tensor with the shape: (samples, channels, rows, cols) if data_format='channels_first' or a 4D tensor with the shape (samples, rows, cols, channels) if data_format='channels_last'.

Returns

A 4D tensor with the shape: (batch_size, channels, pooled_rows, pooled_cols) if data_format='channels_first' or a 4D tensor with shape: (batch_size, pooled_rows, pooled_cols, channels) if data_format='channels_last'.

Return type

Tensor