
    i                     x    d Z ddlmZ ddlmZ ddlmZ ddlmZ  ed      e G d	 d
ee                    Z	d
gZ
y)zTextNet model configuration    )strict   )BackboneConfigMixin)PreTrainedConfig)auto_docstringzczczup/textnet-base)
checkpointc                   4    e Zd ZU dZdZdZeed<   dZeed<   dZ	eed<   dZ
eed	<   d
Zeed<   dZee   eeef   z  ez  ed<   dZedz  ed<   dZedz  ed<   dZee   eedf   z  ed<   dZeed<   dZeed<   dZee   dz  ed<   dZee   dz  ed<    fdZ xZS )TextNetConfiga  
    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.
    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]]`.

    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
    ```textnetr   stem_kernel_size   stem_stridestem_num_channels@   stem_out_channelsrelustem_act_func)  r   
image_sizeNconv_layer_kernel_sizesconv_layer_strides)r   r         i   .hidden_sizesgh㈵>batch_norm_epsg{Gz?initializer_range_out_features_out_indicesc                     | j                   8d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| _         | j                  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   | _        | j                  |j                  dd       |j                  d	d       
       t        | $  di | y c c}w c c}w )Nr      )r    r   r    )r   r    r    r    stem   stageout_indicesout_features)r$   r%    )
r   r   lendepthsrangestage_names"set_output_features_output_indicespopsuper__post_init__)selfkwargslayeridx	__class__s       /var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/textnet/configuration_textnet.pyr.   zTextNetConfig.__post_init__K   s/   ''/Q!Q!Q(Q!Q!Q!Q0Q!Q!Q!Q0Q!Q!Q!Q0	,D( ""*'0,l&[D#/3/K/KLes5zL"8a&Lse}&LL//

=$7fjjQ_aeFf 	0 	
 	'' M&Ls   3C6C;)__name__
__module____qualname____doc__
model_typer   int__annotations__r   r   r   r   strr   listtupler   r   r   r   floatr   r   r   r.   __classcell__)r3   s   @r4   r
   r
      s    B JcKssM34>JS	E#s(O+c1>+/TD[/&*t*0GL$s)eCHo-G NE #u#&*M49t#*%)L$s)d")( (    r
   N)r8   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   r
   __all__r&   rA   r4   <module>rG      sQ    " . 1 3 # 01B(')9 B(  2B(J 
rA   