tf.MaxPool2DLayer module

tf.MaxPool2DLayer module

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

Bases: modelzoo.common.layers.tf.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