Ë
    ÜÓ^js  ã                   óÊ   — d dl mZ d dlmZ ddlmZ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 e
d	¬
«      e G d„ de«      «       «       ZddgZy)é    )ÚSequence)Ústricté   )ÚBackboneConfigMixinÚ%consolidate_backbone_kwargs_to_config)ÚPreTrainedConfig)Úauto_docstringé   )Ú
AutoConfigzPaddlePaddle/UVDoc_safetensors)Ú
checkpointc                   óþ   ‡ — e Zd ZU dZdZdZee   dz  ed<   dZ	ee
   dz  ed<   dZeee
   ee
df   z     ed<   d	Zeeee
e
e
ef   ee
ez     z        ed
<   dZeeee
df   ee
   z        ed<   dZe
ed<   ˆ fd„Zˆ xZS )ÚUVDocBackboneConfiga˜  
    resnet_head (`Sequence[list[int] | tuple[int, ...]]`, *optional*, defaults to `((3, 32), (32, 32))`):
        Configuration for the ResNet head layers in format [in_channels, out_channels].
    resnet_configs (`Sequence[Sequence[tuple[int, int, int, bool] | list[int | bool]]]`, *optional*, defaults to `(((32, 32, 1, False),
        (32, 32, 3, False), (32, 32, 3, False)), ((32, 64, 1, True), (64, 64, 3, False), (64, 64, 3, False), (64, 64, 3, False)), ((64, 128, 1, True),
        (128, 128, 3, False), (128, 128, 3, False), (128, 128, 3, False), (128, 128, 3, False), (128, 128, 3, False)))`):
        Configuration for the ResNet stages in format [in_channels, out_channels, dilation_value, downsample].
    stage_configs (Sequence[Sequence[tuple[int, ...] | list[int]]], *optional*, defaults to `(((128, 1),), ((128, 2),),
        ((128, 5),), ((128, 8),(128, 3),(128, 2),), ((128, 12), (128, 7), (128, 4),), ((128, 18), (128, 12), (128, 6),),)`):
        Configuration for the bridge module stages in format [in_channels, dilation_value].
        Each inner sequence corresponds to a single bridge block, and the outer sequence groups blocks by bridge stage.
    Úuvdoc_backboneNÚ_out_featuresÚ_out_indices))r   é    )r   r   .Úresnet_head)))r   r   é   F©r   r   r   Fr   ))r   é@   r   T©r   r   r   Fr   r   ))r   é€   r   T©r   r   r   Fr   r   r   r   Úresnet_configs)))r   r   )©r   r
   ))r   é   ))r   é   )r   r   r   )©r   é   )r   é   )r   é   ))r   é   r   )r   é   Ústage_configsr   Úkernel_sizec                 óf  •— | j                   D �cg c]  }t        |«      ‘Œ c}| _        dgt        dt        | j                   «      dz   «      D �cg c]  }d|› �‘Œ	 c}z   | _        | j                  |j                  dd «      |j                  dd «      ¬«       t        ‰| �   di |¤Ž y c c}w c c}w )NÚstemr   ÚstageÚout_indicesÚout_features)r)   r*   © )	r$   ÚlenÚdepthsÚrangeÚstage_namesÚ"set_output_features_output_indicesÚpopÚsuperÚ__post_init__)ÚselfÚkwargsÚstagesÚidxÚ	__class__s       €úx/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/uvdoc/configuration_uvdoc.pyr3   z!UVDocBackboneConfig.__post_init__g   s¢   ø€ Ø15×1CÑ1CÖD v”s˜6•{ÒDˆŒØ"˜8ÄÀaÌÈT×M_ÑM_ÓI`ÐcdÑIdÓ@eÖ&f¸¨¨s¨e¢}Ò&fÑfˆÔØ×/Ñ/ØŸ
™
 =°$Ó7ÀfÇjÁjÐQ_ÐaeÓFfð 	0ô 	
ô 	‰ÑÑ' Ó'ùò EùÚ&fs   �B)ÁB.)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   ÚlistÚstrÚ__annotations__r   Úintr   r   Útupler   Úboolr$   r%   r3   Ú__classcell__©r8   s   @r9   r   r       sÎ   ø… ñð "€Jà&*€M�4˜‘9˜tÑ#Ó*Ø%)€L�$�s‘)˜dÑ"Ó)ð:€K�˜$˜s™) e¨C°¨H¡oÑ5Ñ6ó ð
Y€N�H˜X e¨C°°c¸4Ð,?Ñ&@À4ÈÈdÉ
ÑCSÑ&SÑTÑUó ð,F€M�8˜H U¨3°¨8¡_°t¸C±yÑ%@ÑAÑBó ð* €K�Ó÷(ð (ó    r   c                   óÂ   ‡ — e Zd ZU dZdZdeiZdZee	z  dz  e
d<   dZe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edf   z     e
d<   ˆ fd„Zˆ xZS )ÚUVDocConfiga»  
    padding_mode (`str`, *optional*, defaults to `"reflect"`):
        Padding mode for convolutional layers. Supported modes are `"reflect"`, `"constant"`, and `"replicate"`.
    kernel_size (`int`, *optional*, defaults to 5):
        Kernel size for convolutional layers in the backbone network.
    bridge_connector (`list[int] | tuple[int, ...]`, *optional*, defaults to `(128, 128)`):
        Configuration for the bridge connector in format [in_channels, out_channels].
    out_point_positions2D (`Sequence[list[int] | tuple[int, ...]]`, *optional*, defaults to `((128, 32), (32, 2))`):
        Configuration for the output point positions 2D layer in format [in_channels, out_channels].
    ÚuvdocÚbackbone_configNÚpreluÚ
hidden_actÚreflectÚpadding_moder   r%   )r   r   .Úbridge_connector))r   r   )r   r
   Úout_point_positions2Dc                 ód   •— t        d| j                  ddœ|¤Ž\  | _        }t        ‰| �  di |¤Ž y )Nr   )rK   Údefault_config_typer+   )r   rK   r2   r3   )r4   r5   r8   s     €r9   r3   zUVDocConfig.__post_init__ˆ   sB   ø€ Ü'Lð (
Ø ×0Ñ0Ø 0ñ(
ð ñ(
Ñ$ˆÔ˜fô
 	‰ÑÑ' Ó'rG   )r:   r;   r<   r=   r>   r   Úsub_configsrK   Údictr   rA   rM   r@   rO   r%   rB   rP   r?   rC   rQ   r   r3   rE   rF   s   @r9   rI   rI   p   s“   ø… ñ	ð €JØ$ jÐ1€KØ6:€O�TÐ,Ñ,¨tÑ3Ó:à€J�ÓØ!€L�#Ó!Ø€K�ÓØ4>Ð�d˜3‘i %¨¨S¨¡/Ñ1Ó>ØCWÐ˜8 D¨¡I°°c¸3°h±Ñ$?Ñ@ÓW÷(ð (rG   rI   N)Úcollections.abcr   Úhuggingface_hub.dataclassesr   Úbackbone_utilsr   r   Úconfiguration_utilsr   Úutilsr	   Úautor   r   rI   Ú__all__r+   rG   r9   ú<module>r]      s€   ðõ, %å .ç XÝ 3Ý #Ý ñ Ð;Ô<ØôK(Ð-Ð/?ó K(ó ó =ðK(ñ\ Ð;Ô<Øô(Ð"ó (ó ó =ð(ð> ! -Ð
0�rG   