Skip to content

QuantAvgPool2d

Bases: QuantBase

Int8-quantized 2-D average pooling.

Average pooling preserves the value range (outputs always lie within the min / max of inputs), so the input and output share a single scale and zero-point. The output observer is therefore a :class:ViewObserver over the input observer.

Parameters:

Name Type Description Default
kernel_size int | tuple[int, int]

Pooling window size.

required
stride int | tuple[int, int] | None

Pool stride. Defaults to kernel_size.

None
padding int | tuple[int, int] | tuple[int, int, int, int]

Zero-padding. int or 2-tuple (pad_h, pad_w) or 4-tuple (L, R, T, B).

0

pool_area property

pool_area: int

Number of elements in the pooling window (kH * kW).