
    ijt
                     L    d Z ddlmZ ddlmZ  ed       G d de             Zy)zAdaptive Max Pooling 3D layer.    )keras_export)BaseAdaptiveMaxPoolingz!keras.layers.AdaptiveMaxPooling3Dc                   $     e Zd ZdZd fd	Z xZS )AdaptiveMaxPooling3Da  Adaptive max pooling operation for 3D volumetric data.

    This layer applies an adaptive max pooling operation, which pools the
    input such that the output has a target spatial size specified by
    `output_size`, regardless of the input spatial size. The kernel size
    and stride are automatically computed to achieve the target output size.

    Args:
        output_size: Integer or tuple of 3 integers specifying the
            target output size.
            If an integer, the same value is used for depth, height, and width.
        data_format: string, either `"channels_last"` or `"channels_first"`.
            `"channels_last"` corresponds to inputs with shape
            `(batch, depth, height, width, channels)`.
            `"channels_first"` corresponds to inputs with shape
            `(batch, channels, depth, height, width)`.
            Defaults to the value found in your Keras config file at
            `~/.keras/keras.json`. If never set, `"channels_last"` is used.

    Input shape:
        - If `data_format="channels_last"`: 5D tensor
            `(batch_size, depth, height, width, channels)`
        - If `data_format="channels_first"`: 5D tensor
            `(batch_size, channels, depth, height, width)`

    Output shape:
        - If `data_format="channels_last"`:
            `(batch_size, output_depth, output_height, output_width, channels)`
        - If `data_format="channels_first"`:
            `(batch_size, channels, output_depth, output_height, output_width)`

    Examples:
        >>> import numpy as np
        >>> input_vol = np.random.rand(1, 32, 32, 32, 3)
        >>> layer = AdaptiveMaxPooling3D(output_size=16)
        >>> output_vol = layer(input_vol)
        >>> output_vol.shape
        (1, 16, 16, 16, 3)
    c                     t        |t              r|||f}nJt        |t        t        f      rt	        |      dk(  rt        |      }nt        d| dt        |             t        |    ||fi | y )N   zL`output_size` must be an integer or (depth, height, width) tuple. Received: z	 of type )	
isinstanceinttuplelistlen	TypeErrortypesuper__init__)selfoutput_sizedata_formatkwargsoutput_size_tuple	__class__s        /var/www/html/emotional.easysim.app/public_html/venv/lib/python3.12/site-packages/keras/src/layers/pooling/adaptive_max_pooling3d.pyr   zAdaptiveMaxPooling3D.__init__3   s    k3'!,k; GeT]3K8HA8M %k 2(M43D2EG  	*KB6B    )N)__name__
__module____qualname____doc__r   __classcell__)r   s   @r   r   r   	   s    &PC Cr   r   N)r   keras.src.api_exportr   .keras.src.layers.pooling.base_adaptive_poolingr   r    r   r   <module>r"      s5    $ -
 125C1 5C 35Cr   