
    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>Dilated Neighborhood Attention Transformer model configuration    )strict   )BackboneConfigMixin)PreTrainedConfig)auto_docstringzshi-labs/dinat-mini-in1k-224)
checkpointc                       e Zd ZU dZdZdddZdZeee   z  e	eef   z  e
d<   dZee
d	<   d
Zee
d<   dZee   e	edf   z  e
d<   dZee   e	edf   z  e
d<   dZee
d<   dZee	z  dz  e
d<   dZee
d<   dZee
d<   dZeez  e
d<   dZeez  e
d<   dZeez  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   dz  e
d$<   dZee   dz  e
d%<    fd&Z xZ S )'DinatConfiga  
    dilations (`list[list[int]]`, *optional*, defaults to `[[1, 8, 1], [1, 4, 1, 4], [1, 2, 1, 2, 1, 2], [1, 1, 1, 1, 1]]`):
        Dilation value of each NA layer in the Transformer encoder.

    Example:

    ```python
    >>> from transformers import DinatConfig, DinatModel

    >>> # Initializing a Dinat shi-labs/dinat-mini-in1k-224 style configuration
    >>> configuration = DinatConfig()

    >>> # Initializing a model (with random weights) from the shi-labs/dinat-mini-in1k-224 style configuration
    >>> model = DinatModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```dinat	num_heads
num_layers)num_attention_headsnum_hidden_layers   
patch_sizer   num_channels@   	embed_dim)r   r         .depths)   r            kernel_sizeN	dilationsg      @	mlp_ratioTqkv_biasg        hidden_dropout_probattention_probs_dropout_probg?drop_path_rategelu
hidden_actg{Gz?initializer_rangegh㈵>layer_norm_epslayer_scale_init_value_out_features_out_indicesc                    t        | j                        | _        | j                  xs g dg dg dg dg| _        t	        | j
                  dt        | j                        dz
  z  z        | _        dgt        dt        | j                        dz         D cg c]  }d| 	 c}z   | _        | j                  |j                  d	d       |j                  d
d              t        | 0  di | y c c}w )N)   r   r+   )r+   r   r+   r   )r+   r   r+   r   r+   r   )r+   r+   r+   r+   r+   r   r+   stemstageout_indicesout_features)r.   r/    )lenr   r   r   intr   hidden_sizerangestage_names"set_output_features_output_indicespopsuper__post_init__)selfkwargsidx	__class__s      ~/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/dinat/configuration_dinat.pyr9   zDinatConfig.__post_init__G   s    dkk*iI|EWYh+i t~~c$++6F6J0KKL"8aT[[IY\]I]@^&_se}&__//

=$7fjjQ_aeFf 	0 	
 	''	 '`s   C2)!__name__
__module____qualname____doc__
model_typeattribute_mapr   r2   listtuple__annotations__r   r   r   r   r   r   r   floatr   boolr    r!   r"   r$   strr%   r&   r'   r(   r)   r9   __classcell__)r=   s   @r>   r
   r
      s@   & J  +)M
 56Jd3i%S/15L#Is*6FDIc3h'6-:ItCy5c?*:K%)Ite|d")IuHd'**03 %#+3"%NECK%J#u# NE $'E'&*M49t#*%)L$s)d")( (    r
   N)rB   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   r
   __all__r0   rL   r>   <module>rR      sN    E . 1 3 # 9:9(%'7 9(  ;9(x /rL   