
    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VitDet model configuration    )strict   )BackboneConfigMixin)PreTrainedConfig)auto_docstringzgoogle/vitdet-base-patch16-224)
checkpointc                       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z  ed<   dZeed<   dZeed<   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e   z  eee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   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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 ))VitDetConfigaM  
    pretrain_image_size (`int`, *optional*, defaults to 224):
        The size (resolution) of each image during pretraining.
    window_block_indices (`list[int]`, *optional*, defaults to `[]`):
        List of indices of blocks that should have window attention instead of regular global self-attention.
    residual_block_indices (`list[int]`, *optional*, defaults to `[]`):
        List of indices of blocks that should have an extra residual block after the MLP.
    use_relative_position_embeddings (`bool`, *optional*, defaults to `False`):
        Whether to add relative position embeddings to the attention maps.
    window_size (`int`, *optional*, defaults to 0):
        The size of the attention window.

    Example:

    ```python
    >>> from transformers import VitDetConfig, VitDetModel

    >>> # Initializing a VitDet configuration
    >>> configuration = VitDetConfig()

    >>> # Initializing a model (with random weights) from the configuration
    >>> model = VitDetModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```vitdeti   hidden_size   num_hidden_layersnum_attention_heads   	mlp_ratiogelu
hidden_actg        dropout_probg{Gz?initializer_rangegư>layer_norm_eps   
image_sizepretrain_image_size   
patch_sizer   num_channelsTqkv_biasdrop_path_rate .window_block_indicesresidual_block_indices use_absolute_position_embeddingsF use_relative_position_embeddingsr   window_sizeN_out_features_out_indicesc                     dgt        d| j                  dz         D cg c]  }d| 	 c}z   | _        | j                  |j	                  dd       |j	                  dd              t        |   di | y c c}w )Nstem   stageout_indicesout_features)r+   r,   r   )ranger   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/vitdet/configuration_vitdet.pyr2   zVitDetConfig.__post_init__M   s~    "8aI_I_bcIc@d&ese}&ee//

=$7fjjQ_aeFf 	0 	
 	''	 'fs   A8)#__name__
__module____qualname____doc__
model_typer   int__annotations__r   r   r   r   strr   floatr   r   r   listtupler   r   r   r   boolr   r    r!   r"   r#   r$   r%   r&   r2   __classcell__)r6   s   @r7   r
   r
      sn   6 JKs!!IsJ #L%#+##u# NE 47Jd3i%S/17=@tCy5c?:@46Jd3i%S/16L#Hd"%NECK%8:$s)eCHo5::<DIc3h7<-1$d1-2$d2K&*M49t#*%)L$s)d")( (    r
   N)r;   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   r
   __all__r   rE   r7   <module>rK      sN    ! . 1 3 # ;<9(&(8 9(  =9(x 
rE   