Formula

Formula for Pooling Layer Output Size

For an input tensor of size nH×nW×nCn_H \times n_W \times n_C, the output size after applying a pooling layer with a square window of size ff and a stride of ss is:

(nHf)/s+1×(nWf)/s+1×nC\lfloor(n_H - f)/s + 1\rfloor \times \lfloor(n_W - f)/s + 1\rfloor \times n_C

Here, nHn_H, nWn_W, and nCn_C are the height, width, and number of channels of the input layer. The number of output channels remains nCn_C because pooling applies to each channel separately.

0

1

Updated 2026-06-20

Tags

Data Science

D2L

Dive into Deep Learning @ D2L