# Pooling

## BasePool

class `paddle.v2.pooling.``BasePool`(name)

  Base Pooling Type. Note these pooling types are used for sequence input, not for images. Each PoolingType contains one parameter:

  Parameters: | name (basestring) – pooling layer type name used by paddle.

## Avg

class `paddle.v2.pooling.``Avg`(strategy='average')

  Average pooling.

  Return the average values for each dimension in sequence or time steps.

  \[sum(samples\_of\_a\_sequence)/sample\_num\]

## Max

class `paddle.v2.pooling.``Max`(output_max_index=None)

  Max pooling.

  Return the very large values for each dimension in sequence or time steps.

  \[max(samples\_of\_a\_sequence)\]

  Parameters: | output_max_index (bool|None) – True if output sequence max index instead of max value. None means use default value in proto.

## Sum

class `paddle.v2.pooling.``Sum`

  Sum pooling.

  Return the sum values of each dimension in sequence or time steps.

  \[sum(samples\_of\_a\_sequence)\]

## SquareRootN

class `paddle.v2.pooling.``SquareRootN`

  Square Root Pooling.

  Return the square root values of each dimension in sequence or time steps.

  \[sum(samples\_of\_a\_sequence)/sqrt(sample\_num)\]

## CudnnAvg

class `paddle.v2.pooling.``CudnnAvg`

  Cudnn average pooling only support GPU. Return the average value in the pooling window.

## CudnnMax

class `paddle.v2.pooling.``CudnnMax`

  Cudnn max pooling only support GPU. Return the maxinum value in the pooling window.