
    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DINOv2 model configuration    )strict   )BackboneConfigMixin)PreTrainedConfig)auto_docstringzgoogle/dinov2-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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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 z  ed!<   d Zee   d z  ed"<   dZeed#<   dZeed$<   dZ eed%<    fd&Z! xZ"S )'Dinov2Configa  
    layerscale_value (`float`, *optional*, defaults to 1.0):
        Initial value to use for layer scale.
    use_swiglu_ffn (`bool`, *optional*, defaults to `False`):
        Whether to use the SwiGLU feedforward neural network.
    apply_layernorm (`bool`, *optional*, defaults to `True`):
        Whether to apply layer normalization to the feature maps in case the model is used as backbone.
    reshape_hidden_states (`bool`, *optional*, defaults to `True`):
        Whether to reshape the feature maps to 4D tensors of shape `(batch_size, hidden_size, height, width)` in
        case the model is used as backbone. If `False`, the feature maps will be 3D tensors of shape `(batch_size,
        seq_len, hidden_size)`.
    use_mask_token (`bool`, *optional*, defaults to `True`):
        Whether to use mask_token in embeddings.

    Example:

    ```python
    >>> from transformers import Dinov2Config, Dinov2Model

    >>> # Initializing a Dinov2 dinov2-base-patch16-224 style configuration
    >>> configuration = Dinov2Config()

    >>> # Initializing a model (with random weights) from the dinov2-base-patch16-224 style configuration
    >>> model = Dinov2Model(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```dinov2i   hidden_size   num_hidden_layersnum_attention_heads   	mlp_ratiogelu
hidden_actg        hidden_dropout_probattention_probs_dropout_probg{Gz?initializer_rangegư>layer_norm_eps   
image_size   
patch_sizer   num_channelsTqkv_biasg      ?layerscale_valuedrop_path_rateFuse_swiglu_ffnN_out_features_out_indicesapply_layernormreshape_hidden_statesuse_mask_tokenc                     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+    )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/dinov2/configuration_dinov2.pyr2   zDinov2Config.__post_init__O   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   r   listtupler   r   r   boolr   r   r    r!   r"   r#   r$   r%   r2   __classcell__)r6   s   @r7   r
   r
      s:   : JKs!!IsJ'**03 %#+3#u# NE 47Jd3i%S/1746Jd3i%S/16L#Hd!e!"%NECK% ND &*M49t#*%)L$s)d") OT "&4&ND( (    r
   N)r;   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   r
   __all__r,   rE   r7   <module>rK      sN    ! . 1 3 # ;<;(&(8 ;(  =;(| 
rE   