
    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&Swinv2 Transformer model configuration    )strict   )BackboneConfigMixin)PreTrainedConfig)auto_docstringz(microsoft/swinv2-tiny-patch4-window8-256)
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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   e	edf   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(<   d)Zee   d)z  e
d*<   d)Z ee   d)z  e
d+<    fd,Z! xZ"S )-Swinv2ConfigaF  
    window_size (`int`, *optional*, defaults to 7):
        Size of windows.
    pretrained_window_sizes (`list(int)`, *optional*, defaults to `[0, 0, 0, 0]`):
        Size of windows during pretraining.
    encoder_stride (`int`, *optional*, defaults to 32):
        Factor to increase the spatial resolution by in the decoder head for masked image modeling.

    Example:

    ```python
    >>> from transformers import Swinv2Config, Swinv2Model

    >>> # Initializing a Swinv2 microsoft/swinv2-tiny-patch4-window8-256 style configuration
    >>> configuration = Swinv2Config()

    >>> # Initializing a model (with random weights) from the microsoft/swinv2-tiny-patch4-window8-256 style configuration
    >>> model = Swinv2Model(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```swinv2	num_heads
num_layers)num_attention_headsnum_hidden_layers   
image_size   
patch_sizer   num_channels`   	embed_dim)   r      r   .depths)r   r            window_size)r   r   r   r   pretrained_window_sizesg      @	mlp_ratioTqkv_biasg        hidden_dropout_probattention_probs_dropout_probg?drop_path_rategelu
hidden_actFuse_absolute_embeddingsg{Gz?initializer_rangegh㈵>layer_norm_eps    encoder_strideN_out_features_out_indicesc                    t        | j                        | _        dgt        dt        | j                        dz         D cg c]  }d| 	 c}z   | _        | j                  |j                  dd       |j                  dd              t        | j                  dt        | j                        dz
  z  z        | _	        t        | ,  di | y c c}w )	Nstem   stageout_indicesout_features)r1   r2   r    )lenr   r   rangestage_names"set_output_features_output_indicespopintr   hidden_sizesuper__post_init__)selfkwargsidx	__class__s      /var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/swinv2/configuration_swinv2.pyr<   zSwinv2Config.__post_init__M   s    dkk*"8aT[[IY\]I]@^&_se}&__//

=$7fjjQ_aeFf 	0 	

 t~~c$++6F6J0KKL'' '`s   C)#__name__
__module____qualname____doc__
model_typeattribute_mapr   r9   listtuple__annotations__r   r   r   r   r   r   r   r   floatr    boolr!   r"   r#   r%   strr&   r'   r(   r*   r+   r,   r<   __classcell__)r@   s   @rA   r
   r
      sr   . J  +)M
 58Jd3i%S/1745Jd3i%S/15L#Is*6FDIc3h'6-;ItCy5c?*;K;GT#YsCx8GIuHd'**03 %#+3"%NECK%J$)T)#u# NE NC&*M49t#*%)L$s)d")	( 	(    r
   N)rE   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   r
   __all__r3   rO   rA   <module>rU      sO    - . 1 3 # EF=(&(8 =(  G=(@ 
rO   