Ë
    S^(h  ã                   ó`   — d Z ddlmZ ddlmZ  ej
                  e«      Z G d„ de«      ZdgZ	y)zCvT model configurationé   )ÚPretrainedConfig)Úloggingc                   óš   ‡ — e Zd ZdZdZdg d¢g d¢g d¢g d¢g d¢g d	¢g d
¢g d¢g d¢g d¢g d¢g d¢g d¢g d¢g d¢g d¢g d¢g d¢ddfˆ fd„	Zˆ xZS )Ú	CvtConfigaO  
    This is the configuration class to store the configuration of a [`CvtModel`]. It is used to instantiate a CvT model
    according to the specified arguments, defining the model architecture. Instantiating a configuration with the
    defaults will yield a similar configuration to that of the CvT
    [microsoft/cvt-13](https://huggingface.co/microsoft/cvt-13) architecture.

    Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
    documentation from [`PretrainedConfig`] for more information.

    Args:
        num_channels (`int`, *optional*, defaults to 3):
            The number of input channels.
        patch_sizes (`List[int]`, *optional*, defaults to `[7, 3, 3]`):
            The kernel size of each encoder's patch embedding.
        patch_stride (`List[int]`, *optional*, defaults to `[4, 2, 2]`):
            The stride size of each encoder's patch embedding.
        patch_padding (`List[int]`, *optional*, defaults to `[2, 1, 1]`):
            The padding size of each encoder's patch embedding.
        embed_dim (`List[int]`, *optional*, defaults to `[64, 192, 384]`):
            Dimension of each of the encoder blocks.
        num_heads (`List[int]`, *optional*, defaults to `[1, 3, 6]`):
            Number of attention heads for each attention layer in each block of the Transformer encoder.
        depth (`List[int]`, *optional*, defaults to `[1, 2, 10]`):
            The number of layers in each encoder block.
        mlp_ratios (`List[float]`, *optional*, defaults to `[4.0, 4.0, 4.0, 4.0]`):
            Ratio of the size of the hidden layer compared to the size of the input layer of the Mix FFNs in the
            encoder blocks.
        attention_drop_rate (`List[float]`, *optional*, defaults to `[0.0, 0.0, 0.0]`):
            The dropout ratio for the attention probabilities.
        drop_rate (`List[float]`, *optional*, defaults to `[0.0, 0.0, 0.0]`):
            The dropout ratio for the patch embeddings probabilities.
        drop_path_rate (`List[float]`, *optional*, defaults to `[0.0, 0.0, 0.1]`):
            The dropout probability for stochastic depth, used in the blocks of the Transformer encoder.
        qkv_bias (`List[bool]`, *optional*, defaults to `[True, True, True]`):
            The bias bool for query, key and value in attentions
        cls_token (`List[bool]`, *optional*, defaults to `[False, False, True]`):
            Whether or not to add a classification token to the output of each of the last 3 stages.
        qkv_projection_method (`List[string]`, *optional*, defaults to ["dw_bn", "dw_bn", "dw_bn"]`):
            The projection method for query, key and value Default is depth-wise convolutions with batch norm. For
            Linear projection use "avg".
        kernel_qkv (`List[int]`, *optional*, defaults to `[3, 3, 3]`):
            The kernel size for query, key and value in attention layer
        padding_kv (`List[int]`, *optional*, defaults to `[1, 1, 1]`):
            The padding size for key and value in attention layer
        stride_kv (`List[int]`, *optional*, defaults to `[2, 2, 2]`):
            The stride size for key and value in attention layer
        padding_q (`List[int]`, *optional*, defaults to `[1, 1, 1]`):
            The padding size for query in attention layer
        stride_q (`List[int]`, *optional*, defaults to `[1, 1, 1]`):
            The stride size for query in attention layer
        initializer_range (`float`, *optional*, defaults to 0.02):
            The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
        layer_norm_eps (`float`, *optional*, defaults to 1e-6):
            The epsilon used by the layer normalization layers.

    Example:

    ```python
    >>> from transformers import CvtConfig, CvtModel

    >>> # Initializing a Cvt msft/cvt style configuration
    >>> configuration = CvtConfig()

    >>> # Initializing a model (with random weights) from the msft/cvt style configuration
    >>> model = CvtModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Úcvtr   )é   r   r   )é   é   r
   )r
   é   r   )é@   éÀ   i€  )r   r   é   )r   r
   é
   )ç      @r   r   )ç        r   r   )r   r   gš™™™™™¹?)TTT)FFT)Údw_bnr   r   )r   r   r   )r   r   r   )r
   r
   r
   g{®Gáz”?gê-�™—q=c                 óJ  •— t        ‰| �  di |¤Ž || _        || _        || _        || _        || _        || _        || _        || _	        |	| _
        |
| _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        y )N© )ÚsuperÚ__init__Únum_channelsÚpatch_sizesÚpatch_strideÚpatch_paddingÚ	embed_dimÚ	num_headsÚdepthÚ	mlp_ratioÚattention_drop_rateÚ	drop_rateÚdrop_path_rateÚqkv_biasÚ	cls_tokenÚqkv_projection_methodÚ
kernel_qkvÚ
padding_kvÚ	stride_kvÚ	padding_qÚstride_qÚinitializer_rangeÚlayer_norm_eps)Úselfr   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   ÚkwargsÚ	__class__s                          €úg/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/models/cvt/configuration_cvt.pyr   zCvtConfig.__init__a   s±   ø€ ô2 	‰ÑÑ"˜6Ò"Ø(ˆÔØ&ˆÔØ(ˆÔØ*ˆÔØ"ˆŒØ"ˆŒØˆŒ
Ø"ˆŒØ#6ˆÔ Ø"ˆŒØ,ˆÔØ ˆŒØ"ˆŒØ%:ˆÔ"Ø$ˆŒØ$ˆŒØ"ˆŒØ"ˆŒØ ˆŒØ!2ˆÔØ,ˆÕó    )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   Ú__classcell__)r.   s   @r/   r   r      s\   ø„ ñDðL €Jð ÚÚÚÚ ÚÚÚ!Ú+Ú!Ú&Ú#Ú&Ú9ÚÚÚÚÚØØ÷-.-ñ .-r0   r   N)
r4   Úconfiguration_utilsr   Úutilsr   Ú
get_loggerr1   Úloggerr   Ú__all__r   r0   r/   ú<module>r<      s=   ðñ å 3Ý ð 
ˆ×	Ñ	˜HÓ	%€ôw-Ð ô w-ðt ˆ-�r0   