copapy.nn.global_avg_pool2d#

copapy.nn.global_avg_pool2d(x)#

Mean of each channel over height and width.

Parameters:

x (TArr) – Input of shape (channels, height, width) or (batch, channels, height, width).

Return type:

TArr

Returns:

Float array or tensor (same type as x) of shape (channels,) with a leading batch dimension if x has one.