adaptive_avg_pool2d#

ivy.adaptive_avg_pool2d(input, output_size, /, *, data_format='NHWC')[source]#

Apply a 2D adaptive average pooling over an input signal composed of several input planes.

Parameters:
  • input (Union[Array, NativeArray]) – A 3D or 4D input array. Should have a floating-point data type.

  • output_size (Union[Sequence[int], int]) – Spatial output size.

  • data_format (str, default: 'NHWC') – “NHWC” or “NCHW”. Defaults to “NHWC”.

Return type:

Array

Returns:

The result of the pooling operation. Will have shape (N, C, S_0, S_1) or (C, S_0, S_1), where S = output_size

Array.adaptive_avg_pool2d(self, output_size, /, *, data_format='NHWC')[source]#

Apply a 2D adaptive average pooling over an input signal composed of several input planes.

Parameters:
  • self (Array) – A 3D or 4D input array. Should have a floating-point data type.

  • output_size (Union[Sequence[int], int]) – Spatial output size.

  • data_format (str, default: 'NHWC') – “NHWC” or “NCHW”. Defaults to “NHWC”.

Return type:

Array

Returns:

  • The result of the pooling operation. Will have shape (N, C, S_0, S_1) or

  • (C, S_0, S_1), where S = output_size

Container.adaptive_avg_pool2d(self, output_size, /, *, key_chains=None, to_apply=True, prune_unapplied=False, map_sequences=False, data_format='NHWC')[source]#

Apply a 2D adaptive average pooling over an input signal composed of several input planes.

Parameters:
  • self (Container) – Input container.

  • output_size (Union[int, Container]) – Spatial output size.

  • data_format (str, default: 'NHWC') – “NHWC” or “NCHW”. Defaults to “NHWC”.

Return type:

Container

Returns:

The result of the pooling operation.