
    ^j9                     j    d Z ddlmZ ddlmZ ddlmZ  ed      e G d d	e                    Zd	gZy
)zLayoutLMv3 model configuration    )strict   )PreTrainedConfig)auto_docstringzmicrosoft/layoutlmv3-base)
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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dz  ed<   dZedz  ed<   dZe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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.<   d$Z$eed/<   d0Z%eed1<   d2Z&eed3<   d4Z'eee   z  e(eef   z  ed5<   dZ)eez  dz  ed6<   y)7LayoutLMv3ConfigaC  
    max_2d_position_embeddings (`int`, *optional*, defaults to 1024):
        The maximum value that the 2D position embedding might ever be used with. Typically set this to something
        large just in case (e.g., 1024).
    coordinate_size (`int`, *optional*, defaults to `128`):
        Dimension of the coordinate embeddings.
    shape_size (`int`, *optional*, defaults to `128`):
        Dimension of the width and height embeddings.
    has_relative_attention_bias (`bool`, *optional*, defaults to `True`):
        Whether or not to use a relative attention bias in the self-attention mechanism.
    rel_pos_bins (`int`, *optional*, defaults to 32):
        The number of relative position bins to be used in the self-attention mechanism.
    max_rel_pos (`int`, *optional*, defaults to 128):
        The maximum number of relative positions to be used in the self-attention mechanism.
    rel_2d_pos_bins (`int`, *optional*, defaults to 64):
        The number of 2D relative position bins in the self-attention mechanism.
    max_rel_2d_pos (`int`, *optional*, defaults to 256):
        The maximum number of relative 2D positions in the self-attention mechanism.
    has_spatial_attention_bias (`bool`, *optional*, defaults to `True`):
        Whether or not to use a spatial attention bias in the self-attention mechanism.
    text_embed (`bool`, *optional*, defaults to `True`):
        Whether or not to add text embeddings.
    visual_embed (`bool`, *optional*, defaults to `True`):
        Whether or not to add patch embeddings.
    input_size (`int`, *optional*, defaults to `224`):
        The size (resolution) of the images.

    Example:

    ```python
    >>> from transformers import LayoutLMv3Config, LayoutLMv3Model

    >>> # Initializing a LayoutLMv3 microsoft/layoutlmv3-base style configuration
    >>> configuration = LayoutLMv3Config()

    >>> # Initializing a model (with random weights) from the microsoft/layoutlmv3-base style configuration
    >>> model = LayoutLMv3Model(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```
layoutlmv3iY  
vocab_sizei   hidden_size   num_hidden_layersnum_attention_headsi   intermediate_sizegelu
hidden_actg?hidden_dropout_probattention_probs_dropout_probi   max_position_embeddings   type_vocab_sizeg{Gz?initializer_rangegh㈵>layer_norm_eps   Npad_token_idr   bos_token_ideos_token_idi   max_2d_position_embeddings   coordinate_size
shape_sizeThas_relative_attention_bias    rel_pos_binsmax_rel_pos@   rel_2d_pos_bins   max_rel_2d_poshas_spatial_attention_bias
text_embedvisual_embed   
input_sizer   num_channels   
patch_sizeclassifier_dropout)*__name__
__module____qualname____doc__
model_typer   int__annotations__r   r   r   r   r   strr   floatr   r   r   r   r   r   r   r   listr   r    r!   r"   boolr$   r%   r'   r)   r*   r+   r,   r.   r/   r1   tupler2        /var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/transformers/models/layoutlmv3/configuration_layoutlmv3.pyr	   r	      s   (T JJKs!!!s!J'**03 %#+3#&S&OS#u# NE  L#*  L#* +,L#S	/D(,&**OSJ(,,L#KOSNC'++JL$JL#46Jd3i%S/16-1d*1r@   r	   N)	r6   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r	   __all__r?   r@   rA   <module>rF      sK    % . 3 # 67J2' J2  8J2Z 
r@   