ó
    qyüiO  ã                   ó|   • S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  \" S	S
9\ " S S\5      5       5       rS/rg)zDPT model configurationé    )Ústricté   )Ú%consolidate_backbone_kwargs_to_config)ÚPreTrainedConfig)Úauto_docstringé   )Ú
AutoConfigzIntel/dpt-large)Ú
checkpointc                   ó*  ^ • \ rS rSr% SrSrS\0rSr\	\
S'   SrS\	-  \
S	'   Sr\	S-  \
S
'   Sr\	S-  \
S'   Sr\\
S'   Sr\\	-  S-  \
S'   Sr\\	-  S-  \
S'   Sr\\
S'   Sr\S-  \
S'   Sr\	\\	   -  \\	\	4   -  S-  \
S'   Sr\	\\	   -  \\	\	4   -  S-  \
S'   Sr\	S-  \
S'   Sr\\
S'   Sr\S-  \
S'   S r\\	   \\	S!4   -  S-  \
S"'   S#r\\
S$'   S%r\\	\-     \\	\-  S!4   -  \
S&'   S'r \\	   \\	S!4   -  \
S('   S)r!\	\
S*'   S+r"\	\
S,'   Sr#\S-  \
S-'   Sr$\S-  \
S.'   Sr%\\
S/'   Sr&\S-  \
S0'   S1r'\\
S2'   S3r(\	\
S4'   S5r)\\	-  \
S6'   S7r*\\	   \\	S!4   -  S-  \
S8'   S9r+\\	   \\	S!4   -  \
S:'   Sr,\-\.-  S-  \
S'   Sr/\	S-  \
S;'   S<r0\\
S='   U 4S> jr1S?r2U =r3$ )@Ú	DPTConfigé   a8  
is_hybrid (`bool`, *optional*, defaults to `False`):
    Whether to use a hybrid backbone. Useful in the context of loading DPT-Hybrid models.
backbone_out_indices (`list[int]`, *optional*, defaults to `[2, 5, 8, 11]`):
    Indices of the intermediate hidden states to use from backbone.
readout_type (`str`, *optional*, defaults to `"project"`):
    The readout type to use when processing the readout token (CLS token) of the intermediate hidden states of
    the ViT backbone. Can be one of [`"ignore"`, `"add"`, `"project"`].
    - "ignore" simply ignores the CLS token.
    - "add" passes the information from the CLS token to all other tokens by adding the representations.
    - "project" passes information to the other tokens by concatenating the readout to all other tokens before
      projecting the
    representation to the original feature dimension D using a linear layer followed by a GELU non-linearity.
reassemble_factors (`list[int]`, *optional*, defaults to `[4, 2, 1, 0.5]`):
    The up/downsampling factors of the reassemble layers.
neck_hidden_sizes (`list[str]`, *optional*, defaults to `[96, 192, 384, 768]`):
    The hidden sizes to project to for the feature maps of the backbone.
fusion_hidden_size (`int`, *optional*, defaults to 256):
    The number of channels before fusion.
head_in_index (`int`, *optional*, defaults to -1):
    The index of the features to use in the heads.
use_batch_norm_in_fusion_residual (`bool`, *optional*, defaults to `False`):
    Whether to use batch normalization in the pre-activate residual units of the fusion blocks.
use_bias_in_fusion_residual (`bool`, *optional*, defaults to `True`):
    Whether to use bias in the pre-activate residual units of the fusion blocks.
add_projection (`bool`, *optional*, defaults to `False`):
    Whether to add a projection layer before the depth estimation head.
use_auxiliary_head (`bool`, *optional*, defaults to `True`):
    Whether to use an auxiliary head during training.
auxiliary_loss_weight (`float`, *optional*, defaults to 0.4):
    Weight of the cross-entropy loss of the auxiliary head.
semantic_classifier_dropout (`float`, *optional*, defaults to 0.1):
    The dropout ratio for the semantic classification head.
backbone_featmap_shape (`list[int]`, *optional*, defaults to `[1, 1024, 24, 24]`):
    Used only for the `hybrid` embedding type. The shape of the feature maps of the backbone.
neck_ignore_stages (`list[int]`, *optional*, defaults to `[0, 1]`):
    Used only for the `hybrid` embedding type. The stages of the readout layers to ignore.
pooler_output_size (`int`, *optional*):
    Dimensionality of the pooler layer. If None, defaults to `hidden_size`.
pooler_act (`str`, *optional*, defaults to `"tanh"`):
    The activation function to be used by the pooler.

Example:

```python
>>> from transformers import DPTModel, DPTConfig

>>> # Initializing a DPT dpt-large style configuration
>>> configuration = DPTConfig()

>>> # Initializing a model from the dpt-large style configuration
>>> model = DPTModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```ÚdptÚbackbone_configé   Úhidden_sizeé   NÚnum_hidden_layersÚnum_attention_headsi   Úintermediate_sizeÚgeluÚ
hidden_actg        Úhidden_dropout_probÚattention_probs_dropout_probg{®Gáz”?Úinitializer_rangegê-�™—q=Úlayer_norm_epsé€  Ú
image_sizeé   Ú
patch_sizer   Únum_channelsFÚ	is_hybridTÚqkv_bias)r   é   é   é   .Úbackbone_out_indicesÚprojectÚreadout_type)é   r   é   g      à?Úreassemble_factors)é`   éÀ   r   r   Úneck_hidden_sizesé   Úfusion_hidden_sizeéÿÿÿÿÚhead_in_indexÚ!use_batch_norm_in_fusion_residualÚuse_bias_in_fusion_residualÚadd_projectionÚuse_auxiliary_headgš™™™™™Ù?Úauxiliary_loss_weightéÿ   Úsemantic_loss_ignore_indexgš™™™™™¹?Úsemantic_classifier_dropout)r*   i   r   r   Úbackbone_featmap_shape)r   r*   Úneck_ignore_stagesÚpooler_output_sizeÚtanhÚ
pooler_actc                 óø  >• U R                   S;  a  [        S5      eU R                  (       a‚  [        U R                  [
        5      (       a  U R                  R                  SS5        [        SU R                  SSS/ SQ/ SQS	S
.S.UD6u  U l        nU R                   S:w  a  [        S5      eOEUR                  S5      c  U R                  b&  [        SSU R                  0UD6u  U l        nS U l	        U R                  (       a  U R                  OS U l
        U R                  (       a  U R                  O/ U l        U R                  (       a  U R                  OU R                  U l        [        TU ]<  " S0 UD6  g )N)ÚignoreÚaddr'   z8Readout_type must be one of ['ignore', 'add', 'project']Ú
model_typeÚbitÚsameÚ
bottleneck)r   r)   é	   )Ústage1Ústage2Ústage3T)Úglobal_paddingÚ
layer_typeÚdepthsÚout_featuresÚembedding_dynamic_padding)r   Údefault_config_typeÚdefault_config_kwargsr'   z<Readout type must be 'project' when using `DPT-hybrid` mode.Úbackboner   © )r(   Ú
ValueErrorr!   Ú
isinstancer   ÚdictÚ
setdefaultr   Úgetr&   r;   r<   r=   r   ÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €Úf/home/mande/repo/quber/.venv/lib/python3.13/site-packages/transformers/models/dpt/configuration_dpt.pyrZ   ÚDPTConfig.__post_init__{   sY  ø€ Ø×ÑÐ$@Ó@ÜÐWÓXÐXà�>�>Ü˜$×.Ñ.´×5Ñ5Ø×$Ñ$×/Ñ/°¸eÔDä+Pð ,Ø $× 4Ñ 4Ø$)à&,Ø".Ú'Ú$BØ15ñ'ñ,ð ñ,Ñ(ˆDÔ  &ð × Ñ  IÓ-Ü Ð!_Ó`Ð`ð .à�Z‰Z˜
Ó#Ñ/°4×3GÑ3GÑ3SÜ+Pñ ,Ø $× 4Ñ 4ð,àñ,Ñ(ˆDÔ  &ð )-ˆDÔ%àEIÇ^Ç^ d×&AÒ&AÐY]ˆÔ#Ø=A¿^¿^ $×"9Ò"9ÐQSˆÔØ=A×=T×=T $×"9Ò"9ÐZ^×ZjÑZjˆÔÜ‰ÒÑ' Ó'ó    )r   r;   r&   r<   r=   )4Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rC   r	   Úsub_configsr   ÚintÚ__annotations__r   r   r   r   Ústrr   Úfloatr   r   r   r   ÚlistÚtupler   r    r!   Úboolr"   r&   r(   r+   r.   r0   r2   r3   r4   r5   r6   r7   r9   r:   r;   r<   r   rV   r   r=   r?   rZ   Ú__static_attributes__Ú__classcell__)r]   s   @r^   r   r      s`  ø‡ ñ7ðr €JØ$ jÐ1€Kð
 €K�ÓØ$&Ð�t˜c‘zÓ&Ø&(Ð˜˜t™Ó(Ø$(Ð�s˜T‘zÓ(Ø€J�ÓØ.1Ð˜ ™ tÑ+Ó1Ø7:Ð  %¨#¡+°Ñ"4Ó:Ø#Ð�uÓ#Ø#(€N�E˜D‘LÓ(Ø;>€J��d˜3‘i‘ %¨¨S¨¡/Ñ1°DÑ8Ó>Ø;=€J��d˜3‘i‘ %¨¨S¨¡/Ñ1°DÑ8Ó=Ø €L�#˜‘*Ó Ø€IˆtÓØ €Hˆd�T‰kÓ Ø?LÐ˜$˜s™) e¨C°¨H¡oÑ5¸Ñ<ÓLØ!€L�#Ó!ØFTÐ˜˜S 5™[Ñ)¨E°#¸±+¸sÐ2BÑ,CÑCÓTØ5HÐ�t˜C‘y 5¨¨c¨¡?Ñ2ÓHØ!Ð˜Ó!Ø€M�3ÓØ5:Ð% t¨d¡{Ó:Ø/3Ð ¨¡Ó3Ø €N�DÓ Ø&*Ð˜˜t™Ó*Ø#&Ð˜5Ó&Ø&)Ð Ó)Ø/2Ð ¨¡Ó2ØARÐ˜D ™I¨¨c°3¨h©Ñ7¸$Ñ>ÓRØ6<Ð˜˜S™	 E¨#¨s¨(¡OÑ3Ó<Ø6:€O�TÐ,Ñ,¨tÑ3Ó:Ø%)Ð˜˜d™
Ó)Ø€J�Ó÷ (ó  (r`   r   N)re   Úhuggingface_hub.dataclassesr   Úbackbone_utilsr   Úconfiguration_utilsr   Úutilsr   Úauto.configuration_autor	   r   Ú__all__rS   r`   r^   Ú<module>rv      sP   ðñ å .å CÝ 3Ý #Ý 0ñ Ð,Ñ-ØôA(Ð ó A(ó ó .ðA(ðH ˆ-�r`   