# avgpool

## Syntax

## Description

The average pooling operation performs downsampling by dividing the input into pooling regions and computing the average value of each region.

The `avgpool`

function applies the average pooling operation to `dlarray`

data.
Using `dlarray`

objects makes working with high
dimensional data easier by allowing you to label the dimensions. For example, you can label
which dimensions correspond to spatial, time, channel, and batch dimensions using the
`"S"`

, `"T"`

, `"C"`

, and
`"B"`

labels, respectively. For unspecified and other dimensions, use the
`"U"`

label. For `dlarray`

object functions that operate
over particular dimensions, you can specify the dimension labels by formatting the
`dlarray`

object directly, or by using the `DataFormat`

option.

applies the average pooling operation to the formatted `Y`

= avgpool(`X`

,`poolsize`

)`dlarray`

object
`X`

. The function downsamples the input by dividing it into regions
defined by `poolsize`

and calculating the average value of the data in
each region. The output `Y`

is a formatted `dlarray`

with
the same dimension format as `X`

.

The function, by default, pools over up to three dimensions of
`X`

labeled `"S"`

(spatial). To pool over dimensions
labeled `"T"`

(time), specify a pooling region with a `"T"`

dimension using the `PoolFormat`

option.

applies the average pooling operation to the unformatted `Y`

= avgpool(___,'DataFormat',FMT)`dlarray`

object
`X`

with format specified by `FMT`

using any of the
previous syntaxes. The output `Y`

is an unformatted
`dlarray`

object with dimensions in the same order as
`X`

. For example, `'DataFormat','SSCB'`

specifies data
for 2-D average pooling with format `'SSCB'`

(spatial, spatial, channel,
batch).

specifies options using one or more name-value pair arguments. For example,
`Y`

= avgpool(___,`Name,Value`

)`'PoolFormat','T'`

specifies a pooling region for 1-D pooling with format
`'T'`

(time).

## Examples

## Input Arguments

## Output Arguments

## More About

## Extended Capabilities

## Version History

**Introduced in R2019b**