Layer factory function to create a max-pooling layer.
Like Convolution()
, MaxPooling()
processes items arranged on an N-dimensional grid, such as an image.
Typically, each item is a vector. For each item, max-pooling computes the element-wise maximum over a window ("receptive field") of items surrounding the item’s position on the grid.
The size (spatial extent) of the receptive field is given by filter_shape.
E.g. for 2D pooling, filter_shape should be a tuple of two integers, such as (5,5).
MaxPooling(filter_shape, strides = 1, pad = FALSE, name = "")
filter_shape | int or list of int - shape (spatial extent) of the receptive field, not including the input feature-map depth. E.g. (3,3) for a 2D convolution. |
---|---|
strides | (int or tuple of ints, defaults to 1) – stride of the operation. Use a list of ints to specify a per-axis value. integer defining length of stride |
pad | (bool or list of bools) – if False, then the operation will be shifted over the “valid” area of input, that is, no value outside the area is used. If pad=True on the other hand, the operation will be applied to all input positions, and positions outside the valid region will be considered containing zero. Use a list to specify a per-axis value. logical for whether or not the pooling operation should be shifted over the "valid" area of input |
name | string (optional) the name of the Function instance in the network |