
    6bi|                     8   S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSK	J
r
  SSKJr  \" S	/S
9 " S S\R                  \
R                  5      5       r\" S/S
9   S(S j5       r\" S/S
9 " S S\R                   \
R                  5      5       r\" S/S
9   S(S j5       r\" S/S
9 " S S\R$                  \
R                  5      5       r\" S/S
9   S(S j5       r\" S/S
9 " S S\R(                  \
R                  5      5       r\" S/S
9   S(S j5       r\" S/S
9 " S S \R,                  \
R                  5      5       r\" S!/S
9   S(S" j5       r\" S#/S
9 " S$ S%\R0                  \
R                  5      5       r\" S&/S
9   S(S' j5       r\r\r\r\rg))z@Contains the pooling layer classes and their functional aliases.    )absolute_import)division)print_functionN)layers)base)keras_exportz1keras.__internal__.legacy.layers.AveragePooling1D)v1c                   6   ^  \ rS rSrSr   SU 4S jjrSrU =r$ )AveragePooling1D   a  Average Pooling layer for 1D inputs.

Args:
  pool_size: An integer or tuple/list of a single integer,
    representing the size of the pooling window.
  strides: An integer or tuple/list of a single integer, specifying the
    strides of the pooling operation.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string, one of `channels_last` (default) or
    `channels_first`. The ordering of the dimensions in the inputs.
    `channels_last` corresponds to inputs with shape
    `(batch, length, channels)` while `channels_first` corresponds to
    inputs with shape `(batch, channels, length)`.
  name: A string, the name of the layer.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.AveragePooling1D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 pooling = tf.compat.v1.layers.AveragePooling1D(pool_size=2, strides=2)
```

After:

```python
 pooling = tf.keras.layers.AveragePooling1D(pool_size=2, strides=2)
```
@end_compatibility
c           	      N   > Uc  [        S5      e[        TU ]  " SUUUUUS.UD6  g Nz$Argument `strides` must not be None.	pool_sizestridespaddingdata_formatname 
ValueErrorsuper__init__selfr   r   r   r   r   kwargs	__class__s          _/home/james-whalen/.local/lib/python3.13/site-packages/tf_keras/src/legacy_tf_layers/pooling.pyr   AveragePooling1D.__init__P   A     ?CDD 	
#	
 	
    r   validchannels_lastN__name__
__module____qualname____firstlineno____doc__r   __static_attributes____classcell__r   s   @r   r   r          .h #
 
r!   r   z2keras.__internal__.legacy.layers.average_pooling1dc                 V    [         R                  " SSS9  [        UUUUUS9nU" U 5      $ )a  Average Pooling layer for 1D inputs.

Args:
  inputs: The tensor over which to pool. Must have rank 3.
  pool_size: An integer or tuple/list of a single integer,
    representing the size of the pooling window.
  strides: An integer or tuple/list of a single integer, specifying the
    strides of the pooling operation.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string, one of `channels_last` (default) or
    `channels_first`. The ordering of the dimensions in the inputs.
    `channels_last` corresponds to inputs with shape
    `(batch, length, channels)` while `channels_first` corresponds to
    inputs with shape `(batch, channels, length)`.
  name: A string, the name of the layer.

Returns:
  The output tensor, of rank 3.

Raises:
  ValueError: if eager execution is enabled.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.AveragePooling1D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 y = tf.compat.v1.layers.average_pooling1d(x, pool_size=2, strides=2)
```

After:

To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):

```python
 x = tf.keras.Input((28, 28, 1))
 y = tf.keras.layers.AveragePooling1D(pool_size=2, strides=2)(x)
 model = tf.keras.Model(x, y)
```
@end_compatibility
z`tf.layers.average_pooling1d` is deprecated and will be removed in a future version. Please use `tf.keras.layers.AveragePooling1D` instead.   
stacklevelr   )warningswarnr   inputsr   r   r   r   r   layers          r   average_pooling1dr8   e   sC    H MM	A 	 E =r!   z-keras.__internal__.legacy.layers.MaxPooling1Dc                   6   ^  \ rS rSrSr   SU 4S jjrSrU =r$ )MaxPooling1D   a  Max Pooling layer for 1D inputs.

Args:
  pool_size: An integer or tuple/list of a single integer,
    representing the size of the pooling window.
  strides: An integer or tuple/list of a single integer, specifying the
    strides of the pooling operation.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string, one of `channels_last` (default) or
    `channels_first`. The ordering of the dimensions in the inputs.
    `channels_last` corresponds to inputs with shape
    `(batch, length, channels)` while `channels_first` corresponds to
    inputs with shape `(batch, channels, length)`.
  name: A string, the name of the layer.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.MaxPooling1D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 pooling = tf.compat.v1.layers.MaxPooling1D(pool_size=2, strides=2)
```

After:

```python
 pooling = tf.keras.layers.MaxPooling1D(pool_size=2, strides=2)
```
@end_compatibility
c           	      N   > Uc  [        S5      e[        TU ]  " SUUUUUS.UD6  g r   r   r   s          r   r   MaxPooling1D.__init__   r    r!   r   r"   r%   r-   s   @r   r:   r:      r.   r!   r:   z.keras.__internal__.legacy.layers.max_pooling1dc                 V    [         R                  " SSS9  [        UUUUUS9nU" U 5      $ )a  Max Pooling layer for 1D inputs.

Args:
  inputs: The tensor over which to pool. Must have rank 3.
  pool_size: An integer or tuple/list of a single integer,
    representing the size of the pooling window.
  strides: An integer or tuple/list of a single integer, specifying the
    strides of the pooling operation.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string, one of `channels_last` (default) or
    `channels_first`. The ordering of the dimensions in the inputs.
    `channels_last` corresponds to inputs with shape
    `(batch, length, channels)` while `channels_first` corresponds to
    inputs with shape `(batch, channels, length)`.
  name: A string, the name of the layer.

Returns:
  The output tensor, of rank 3.

Raises:
  ValueError: if eager execution is enabled.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.MaxPooling1D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 y = tf.compat.v1.layers.max_pooling1d(x, pool_size=2, strides=2)
```

After:

To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):

```python
 x = tf.keras.Input((28, 28, 1))
 y = tf.keras.layers.MaxPooling1D(pool_size=2, strides=2)(x)
 model = tf.keras.Model(x, y)
```
@end_compatibility
z`tf.layers.max_pooling1d` is deprecated and will be removed in a future version. Please use `tf.keras.layers.MaxPooling1D` instead.r0   r1   r   )r3   r4   r:   r5   s          r   max_pooling1dr?      sB    H MM	= 	 E =r!   z1keras.__internal__.legacy.layers.AveragePooling2Dc                   6   ^  \ rS rSrSr   SU 4S jjrSrU =r$ )AveragePooling2DiT  a  Average pooling layer for 2D inputs (e.g. images).

Args:
  pool_size: An integer or tuple/list of 2 integers: (pool_height,
    pool_width) specifying the size of the pooling window.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  strides: An integer or tuple/list of 2 integers,
    specifying the strides of the pooling operation.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string. The ordering of the dimensions in the inputs.
    `channels_last` (default) and `channels_first` are supported.
    `channels_last` corresponds to inputs with shape
    `(batch, height, width, channels)` while `channels_first` corresponds to
    inputs with shape `(batch, channels, height, width)`.
  name: A string, the name of the layer.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.AveragePooling2D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 pooling = tf.compat.v1.layers.AveragePooling2D(pool_size=2, strides=2)
```

After:

```python
 pooling = tf.keras.layers.AveragePooling2D(pool_size=2, strides=2)
```
@end_compatibility
c           	      N   > Uc  [        S5      e[        TU ]  " SUUUUUS.UD6  g r   r   r   s          r   r   AveragePooling2D.__init__  r    r!   r   r"   r%   r-   s   @r   rA   rA   T      2p #
 
r!   rA   z2keras.__internal__.legacy.layers.average_pooling2dc                 V    [         R                  " SSS9  [        UUUUUS9nU" U 5      $ )a  Average pooling layer for 2D inputs (e.g. images).

Args:
  inputs: The tensor over which to pool. Must have rank 4.
  pool_size: An integer or tuple/list of 2 integers: (pool_height,
    pool_width) specifying the size of the pooling window.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  strides: An integer or tuple/list of 2 integers,
    specifying the strides of the pooling operation.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string. The ordering of the dimensions in the inputs.
    `channels_last` (default) and `channels_first` are supported.
    `channels_last` corresponds to inputs with shape
    `(batch, height, width, channels)` while `channels_first` corresponds to
    inputs with shape `(batch, channels, height, width)`.
  name: A string, the name of the layer.

Returns:
  Output tensor.

Raises:
  ValueError: if eager execution is enabled.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.AveragePooling2D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 y = tf.compat.v1.layers.average_pooling2d(x, pool_size=2, strides=2)
```

After:

To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):

```python
 x = tf.keras.Input((28, 28, 1))
 y = tf.keras.layers.AveragePooling2D(pool_size=2, strides=2)(x)
 model = tf.keras.Model(x, y)
```
@end_compatibility
z`tf.layers.average_pooling2d` is deprecated and will be removed in a future version. Please use `tf.keras.layers.AveragePooling2D` instead.r0   r1   r   )r3   r4   rA   r5   s          r   average_pooling2drF     sC    P MM	A 	 E =r!   z-keras.__internal__.legacy.layers.MaxPooling2Dc                   6   ^  \ rS rSrSr   SU 4S jjrSrU =r$ )MaxPooling2Di  a{  Max pooling layer for 2D inputs (e.g. images).

Args:
  pool_size: An integer or tuple/list of 2 integers: (pool_height,
    pool_width) specifying the size of the pooling window.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  strides: An integer or tuple/list of 2 integers,
    specifying the strides of the pooling operation.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string. The ordering of the dimensions in the inputs.
    `channels_last` (default) and `channels_first` are supported.
    `channels_last` corresponds to inputs with shape
    `(batch, height, width, channels)` while `channels_first` corresponds to
    inputs with shape `(batch, channels, height, width)`.
  name: A string, the name of the layer.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.MaxPooling2D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 pooling = tf.compat.v1.layers.MaxPooling2D(pool_size=2, strides=2)
```

After:

```python
 pooling = tf.keras.layers.MaxPooling2D(pool_size=2, strides=2)
```
@end_compatibility
c           	      N   > Uc  [        S5      e[        TU ]  " SUUUUUS.UD6  g r   r   r   s          r   r   MaxPooling2D.__init__-  r    r!   r   r"   r%   r-   s   @r   rH   rH     rD   r!   rH   z.keras.__internal__.legacy.layers.max_pooling2dc                 V    [         R                  " SSS9  [        UUUUUS9nU" U 5      $ )a  Max pooling layer for 2D inputs (e.g. images).

Args:
  inputs: The tensor over which to pool. Must have rank 4.
  pool_size: An integer or tuple/list of 2 integers: (pool_height,
    pool_width) specifying the size of the pooling window.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  strides: An integer or tuple/list of 2 integers,
    specifying the strides of the pooling operation.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string. The ordering of the dimensions in the inputs.
    `channels_last` (default) and `channels_first` are supported.
    `channels_last` corresponds to inputs with shape
    `(batch, height, width, channels)` while `channels_first` corresponds to
    inputs with shape `(batch, channels, height, width)`.
  name: A string, the name of the layer.

Returns:
  Output tensor.

Raises:
  ValueError: if eager execution is enabled.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.MaxPooling2D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 y = tf.compat.v1.layers.max_pooling2d(x, pool_size=2, strides=2)
```

After:

To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):

```python
 x = tf.keras.Input((28, 28, 1))
 y = tf.keras.layers.MaxPooling2D(pool_size=2, strides=2)(x)
 model = tf.keras.Model(x, y)
```
@end_compatibility
z`tf.layers.max_pooling2d` is deprecated and will be removed in a future version. Please use `tf.keras.layers.MaxPooling2D` instead.r0   r1   r   )r3   r4   rH   r5   s          r   max_pooling2drL   B  sB    P MM	= 	 E =r!   z1keras.__internal__.legacy.layers.AveragePooling3Dc                   6   ^  \ rS rSrSr   SU 4S jjrSrU =r$ )AveragePooling3Di  a  Average pooling layer for 3D inputs (e.g. volumes).

Args:
  pool_size: An integer or tuple/list of 3 integers:
    (pool_depth, pool_height, pool_width)
    specifying the size of the pooling window.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  strides: An integer or tuple/list of 3 integers,
    specifying the strides of the pooling operation.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string. The ordering of the dimensions in the inputs.
    `channels_last` (default) and `channels_first` are supported.
    `channels_last` corresponds to inputs with shape
    `(batch, depth, height, width, channels)` while `channels_first`
    corresponds to inputs with shape
    `(batch, channels, depth, height, width)`.
  name: A string, the name of the layer.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.AveragePooling3D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 pooling = tf.compat.v1.layers.AveragePooling3D(pool_size=2, strides=2)
```

After:

```python
 pooling = tf.keras.layers.AveragePooling3D(pool_size=2, strides=2)
```
@end_compatibility
c           	      N   > Uc  [        S5      e[        TU ]  " SUUUUUS.UD6  g r   r   r   s          r   r   AveragePooling3D.__init__  r    r!   r   r"   r%   r-   s   @r   rN   rN         4t #
 
r!   rN   z2keras.__internal__.legacy.layers.average_pooling3dc                 V    [         R                  " SSS9  [        UUUUUS9nU" U 5      $ )a  Average pooling layer for 3D inputs (e.g. volumes).

Args:
  inputs: The tensor over which to pool. Must have rank 5.
  pool_size: An integer or tuple/list of 3 integers:
    (pool_depth, pool_height, pool_width)
    specifying the size of the pooling window.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  strides: An integer or tuple/list of 3 integers,
    specifying the strides of the pooling operation.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string. The ordering of the dimensions in the inputs.
    `channels_last` (default) and `channels_first` are supported.
    `channels_last` corresponds to inputs with shape
    `(batch, depth, height, width, channels)` while `channels_first`
    corresponds to inputs with shape
    `(batch, channels, depth, height, width)`.
  name: A string, the name of the layer.

Returns:
  Output tensor.

Raises:
  ValueError: if eager execution is enabled.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.AveragePooling3D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 y = tf.compat.v1.layers.average_pooling3d(x, pool_size=2, strides=2)
```

After:

To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):

```python
 x = tf.keras.Input((28, 28, 1))
 y = tf.keras.layers.AveragePooling3D(pool_size=2, strides=2)(x)
 model = tf.keras.Model(x, y)
```
@end_compatibility
z`tf.layers.average_pooling3d` is deprecated and will be removed in a future version. Please use `tf.keras.layers.AveragePooling3D` instead.r0   r1   r   )r3   r4   rN   r5   s          r   average_pooling3drS     sC    T MM	A 	 E =r!   z-keras.__internal__.legacy.layers.MaxPooling3Dc                   6   ^  \ rS rSrSr   SU 4S jjrSrU =r$ )MaxPooling3DiA  a  Max pooling layer for 3D inputs (e.g. volumes).

Args:
  pool_size: An integer or tuple/list of 3 integers:
    (pool_depth, pool_height, pool_width)
    specifying the size of the pooling window.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  strides: An integer or tuple/list of 3 integers,
    specifying the strides of the pooling operation.
    Can be a single integer to specify the same value for
    all spatial dimensions.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string. The ordering of the dimensions in the inputs.
    `channels_last` (default) and `channels_first` are supported.
    `channels_last` corresponds to inputs with shape
    `(batch, depth, height, width, channels)` while `channels_first`
    corresponds to inputs with shape
    `(batch, channels, depth, height, width)`.
  name: A string, the name of the layer.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.MaxPooling3D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 pooling = tf.compat.v1.layers.MaxPooling3D(pool_size=2, strides=2)
```

After:

```python
 pooling = tf.keras.layers.MaxPooling3D(pool_size=2, strides=2)
```
@end_compatibility
c           	      N   > Uc  [        S5      e[        TU ]  " SUUUUUS.UD6  g r   r   r   s          r   r   MaxPooling3D.__init__y  r    r!   r   r"   r%   r-   s   @r   rU   rU   A  rQ   r!   rU   z.keras.__internal__.legacy.layers.max_pooling3dc                 V    [         R                  " SSS9  [        UUUUUS9nU" U 5      $ )a  Max pooling layer for 3D inputs (e.g.

volumes).

Args:
  inputs: The tensor over which to pool. Must have rank 5.
  pool_size: An integer or tuple/list of 3 integers: (pool_depth,
    pool_height, pool_width) specifying the size of the pooling window. Can
    be a single integer to specify the same value for all spatial
    dimensions.
  strides: An integer or tuple/list of 3 integers, specifying the strides of
    the pooling operation. Can be a single integer to specify the same value
    for all spatial dimensions.
  padding: A string. The padding method, either 'valid' or 'same'.
    Case-insensitive.
  data_format: A string. The ordering of the dimensions in the inputs.
    `channels_last` (default) and `channels_first` are supported.
    `channels_last` corresponds to inputs with shape `(batch, depth, height,
    width, channels)` while `channels_first` corresponds to inputs with
    shape `(batch, channels, depth, height, width)`.
  name: A string, the name of the layer.

Returns:
  Output tensor.

Raises:
  ValueError: if eager execution is enabled.


@compatibility(TF2)
This API is a legacy api that is only compatible with eager execution and
`tf.function` if you combine it with
`tf.compat.v1.keras.utils.track_tf1_style_variables`

Please refer to [tf.layers model mapping section of the migration guide]
(https://www.tensorflow.org/guide/migrate/model_mapping)
to learn how to use your TensorFlow v1 model in TF2 with TF-Keras.

The corresponding TensorFlow v2 layer is
`tf.keras.layers.MaxPooling3D`.


#### Structural Mapping to Native TF2

None of the supported arguments have changed name.

Before:

```python
 y = tf.compat.v1.layers.max_pooling3d(x, pool_size=2, strides=2)
```

After:

To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):

```python
 x = tf.keras.Input((28, 28, 1))
 y = tf.keras.layers.MaxPooling3D(pool_size=2, strides=2)(x)
 model = tf.keras.Model(x, y)
```
@end_compatibility
z`tf.layers.max_pooling3d` is deprecated and will be removed in a future version. Please use `tf.keras.layers.MaxPooling3D` instead.r0   r1   r   )r3   r4   rU   r5   s          r   max_pooling3drY     sB    R MM	= 	 E =r!   r"   )r*   
__future__r   r   r   r3   tf_keras.srcr   keras_layerstf_keras.src.legacy_tf_layersr    tensorflow.python.util.tf_exportr   r   Layerr8   r:   r?   rA   rF   rH   rL   rN   rS   rU   rY   	AvgPool2D	MaxPool2D
max_pool2d
avg_pool2dr   r!   r   <module>rd      s~    G &  %  / . : EFGC
|44djj C
 HC
L FGH
 	P IPf ABCC
<,,djj C
 DC
L BCD
 	P EPf EFGG
|44djj G
 HG
T FGH
 	T ITn ABCG
<,,djj G
 DG
T BCD
 	T ETn EFGI
|44djj I
 HI
X FGH
 	V IVr ABCI
<,,djj I
 DI
X BCD
 	U EUt 		

r!   