Ë
    T^(hD  ã                   ór   — d Z ddlmZ ddlmZ ddlmZmZ  ej                  e	«      Z
 G d„ dee«      ZdgZy)zTextNet model configurationé    )ÚPretrainedConfig)Úlogging)ÚBackboneConfigMixinÚ*get_aligned_output_features_output_indicesc                   óJ   ‡ — e Zd ZdZdZdddddddgddg d	¢d
dddfˆ fd„	Zˆ xZS )ÚTextNetConfiga6  
    This is the configuration class to store the configuration of a [`TextNextModel`]. It is used to instantiate a
    TextNext 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
    [czczup/textnet-base](https://huggingface.co/czczup/textnet-base). Configuration objects inherit from
    [`PretrainedConfig`] and can be used to control the model outputs.Read the documentation from [`PretrainedConfig`]
    for more information.

    Args:
        stem_kernel_size (`int`, *optional*, defaults to 3):
            The kernel size for the initial convolution layer.
        stem_stride (`int`, *optional*, defaults to 2):
            The stride for the initial convolution layer.
        stem_num_channels (`int`, *optional*, defaults to 3):
            The num of channels in input for the initial convolution layer.
        stem_out_channels (`int`, *optional*, defaults to 64):
            The num of channels in out for the initial convolution layer.
        stem_act_func (`str`, *optional*, defaults to `"relu"`):
            The activation function for the initial convolution layer.
        image_size (`Tuple[int, int]`, *optional*, defaults to `[640, 640]`):
            The size (resolution) of each image.
        conv_layer_kernel_sizes (`List[List[List[int]]]`, *optional*):
            A list of stage-wise kernel sizes. If `None`, defaults to:
            `[[[3, 3], [3, 3], [3, 3]], [[3, 3], [1, 3], [3, 3], [3, 1]], [[3, 3], [3, 3], [3, 1], [1, 3]], [[3, 3], [3, 1], [1, 3], [3, 3]]]`.
        conv_layer_strides (`List[List[int]]`, *optional*):
            A list of stage-wise strides. If `None`, defaults to:
            `[[1, 2, 1], [2, 1, 1, 1], [2, 1, 1, 1], [2, 1, 1, 1]]`.
        hidden_sizes (`List[int]`, *optional*, defaults to `[64, 64, 128, 256, 512]`):
            Dimensionality (hidden size) at each stage.
        batch_norm_eps (`float`, *optional*, defaults to 1e-05):
            The epsilon used by the batch normalization layers.
        initializer_range (`float`, *optional*, defaults to 0.02):
            The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
        out_features (`List[str]`, *optional*):
            If used as backbone, list of features to output. Can be any of `"stem"`, `"stage1"`, `"stage2"`, etc.
            (depending on how many stages the model has). If unset and `out_indices` is set, will default to the
            corresponding stages. If unset and `out_indices` is unset, will default to the last stage.
        out_indices (`List[int]`, *optional*):
            If used as backbone, list of indices of features to output. Can be any of 0, 1, 2, etc. (depending on how
            many stages the model has). If unset and `out_features` is set, will default to the corresponding stages.
            If unset and `out_features` is unset, will default to the last stage.

    Examples:

    ```python
    >>> from transformers import TextNetConfig, TextNetBackbone

    >>> # Initializing a TextNetConfig
    >>> configuration = TextNetConfig()

    >>> # Initializing a model (with random weights)
    >>> model = TextNetBackbone(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Útextneté   é   é@   Úrelui€  N)r   r   é€   é   i   gñhãˆµøä>g{®Gáz”?c                 óB  •— t        ‰| �  d	i |¤Ž |€3ddgddgddggddgddgddgddggddgddgddgddggddgddgddgddggg}|€g d¢g d¢g d¢g d¢g}|| _        || _        || _        || _        || _        || _        || _        || _	        || _
        |	| _        |
| _        | j                  D �cg c]  }t        |«      ‘Œ c}| _        dgt        dd«      D �cg c]  }d|› �‘Œ	 c}z   | _        t#        ||| j                   ¬«      \  | _        | _        y c c}w c c}w )
Nr
   é   )r   r   r   )r   r   r   r   Ústemé   Ústage)Úout_featuresÚout_indicesÚstage_names© )ÚsuperÚ__init__Ústem_kernel_sizeÚstem_strideÚstem_num_channelsÚstem_out_channelsÚstem_act_funcÚ
image_sizeÚconv_layer_kernel_sizesÚconv_layer_stridesÚinitializer_rangeÚhidden_sizesÚbatch_norm_epsÚlenÚdepthsÚranger   r   Ú_out_featuresÚ_out_indices)Úselfr   r   r   r   r   r    r!   r"   r$   r%   r#   r   r   ÚkwargsÚlayerÚidxÚ	__class__s                    €úo/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/transformers/models/textnet/configuration_textnet.pyr   zTextNetConfig.__init__U   sh  ø€ ô" 	‰ÑÑ"˜6Ò"à"Ð*à�Q�˜!˜Q˜ ! Q Ð(Ø�Q�˜!˜Q˜ ! Q ¨!¨Q¨Ð0Ø�Q�˜!˜Q˜ ! Q ¨!¨Q¨Ð0Ø�Q�˜!˜Q˜ ! Q ¨!¨Q¨Ð0ð	'Ð#ð Ð%Ú"+ª\º<ÊÐ!VÐà 0ˆÔØ&ˆÔØ!2ˆÔØ!2ˆÔØ*ˆÔà$ˆŒØ'>ˆÔ$Ø"4ˆÔà!2ˆÔØ(ˆÔØ,ˆÔà/3×/KÑ/KÖL e”s˜5•zÒLˆŒØ"˜8ÄÀaÈÃÖ&L¸¨¨s¨e¢}Ò&LÑLˆÔÜ0ZØ%°;ÈD×L\ÑL\ô1
Ñ-ˆÔ˜DÕ-ùò MùÚ&Ls   Â1DÃD)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   Ú__classcell__)r/   s   @r0   r   r      sG   ø„ ñ7ðr €Jð ØØØØØ˜�:Ø $ØÚ,ØØØØ÷/
ñ /
ó    r   N)r4   Útransformersr   Útransformers.utilsr   Ú!transformers.utils.backbone_utilsr   r   Ú
get_loggerr1   Úloggerr   Ú__all__r   r7   r0   ú<module>r>      sD   ðñ "å )Ý &ß mð 
ˆ×	Ñ	˜HÓ	%€ôk
Ð'Ð)9ô k
ð\ Ð
�r7   