
    Z j                     r    S 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BEiT model configuration    )strict   )BackboneConfigMixin)PreTrainedConfig)auto_docstringz%microsoft/beit-base-patch16-224-pt22k)
checkpointc                   \  ^  \ rS rSr% SrSrSr\\S'   Sr	\\S'   Sr
\\S	'   Sr\\S
'   Sr\\S'   Sr\\S'   Sr\\-  \S'   Sr\\-  \S'   Sr\\S'   Sr\\S'   Sr\\\   -  \\\4   -  \S'   Sr\\\   -  \\\4   -  \S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S '   S!r\\S"'   S!r\\-  \S#'   S$r \\S%'   S&r!\\   \\S'4   -  \S('   S$r"\\S)'   S*r#\\S+'   S,r$\\S-'   S.r%\\S/'   Sr&\\S0'   S1r'\\S2'   S3r(\\   S3-  \S4'   S3r)\\   S3-  \S5'   Sr*\\S6'   S$r+\\S7'   U 4S8 jr,S9r-U =r.$ ):
BeitConfig   aC	  
use_mask_token (`bool`, *optional*, defaults to `False`):
    Whether to use a mask token for masked image modeling.
use_relative_position_bias (`bool`, *optional*, defaults to `False`):
    Whether to use T5-style relative position embeddings in the self-attention layers.
use_shared_relative_position_bias (`bool`, *optional*, defaults to `False`):
    Whether to use the same relative position embeddings across all self-attention layers of the Transformer.
use_mean_pooling (`bool`, *optional*, defaults to `True`):
    Whether to mean pool the final hidden states of the patches instead of using the final hidden state of the
    CLS token, before applying the classification head.
pool_scales (`tuple[int]`, *optional*, defaults to `[1, 2, 3, 6]`):
    Pooling scales used in Pooling Pyramid Module applied on the last feature map.
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.
auxiliary_channels (`int`, *optional*, defaults to 256):
    Number of channels to use in the auxiliary head.
auxiliary_num_convs (`int`, *optional*, defaults to 1):
    Number of convolutional layers to use in the auxiliary head.
auxiliary_concat_input (`bool`, *optional*, defaults to `False`):
    Whether to concatenate the output of the auxiliary head with the input before the classification layer.
add_fpn (`bool`, *optional*, defaults to `False`):
    Whether to add a FPN as part of the backbone. Only relevant for [`BeitBackbone`].
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)`. Only relevant for [`BeitBackbone`].

Example:

```python
>>> from transformers import BeitConfig, BeitModel

>>> # Initializing a BEiT beit-base-patch16-224-pt22k style configuration
>>> configuration = BeitConfig()

>>> # Initializing a model (with random weights) from the beit-base-patch16-224-pt22k style configuration
>>> model = BeitModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```beiti    
vocab_sizei   hidden_size   num_hidden_layersnum_attention_headsi   intermediate_sizegelu
hidden_actg        hidden_dropout_probattention_probs_dropout_probg{Gz?initializer_rangeg-q=layer_norm_eps   
image_size   
patch_sizer   num_channelsFuse_mask_token use_absolute_position_embeddingsuse_relative_position_bias!use_shared_relative_position_biasg?layer_scale_init_valuedrop_path_rateTuse_mean_pooling)      r      .pool_scalesuse_auxiliary_headg?auxiliary_loss_weight   auxiliary_channelsr%   auxiliary_num_convsauxiliary_concat_input   semantic_loss_ignore_indexN_out_features_out_indicesadd_fpnreshape_hidden_statesc                 T  > SU;   a&  UR                  S5      c  UR                  S5      US'   S/[        SU R                  S-   5       Vs/ s H  nSU 3PM
     sn-   U l        U R                  UR                  SS 5      UR                  SS 5      S9  [        TU ]  " S0 UD6  g s  snf )	Nsegmentation_indicesout_indicesstemr%   stageout_features)r7   r:    )getpopranger   stage_names"set_output_features_output_indicessuper__post_init__)selfkwargsidx	__class__s      |/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/beit/configuration_beit.pyrB   BeitConfig.__post_init__h   s    !V+

=0I0Q$*JJ/E$FF=! #8aI_I_bcIc@d&e@dse}@d&ee//

=$7fjjQ_aeFf 	0 	
 	'' 'fs   B%)r?   )/__name__
__module____qualname____firstlineno____doc__
model_typer   int__annotations__r   r   r   r   r   strr   floatr   r   r   r   listtupler   r   r   boolr   r    r!   r"   r#   r$   r(   r)   r*   r,   r-   r.   r0   r1   r2   r3   r4   rB   __static_attributes____classcell__)rF   s   @rG   r
   r
      s   *X JJKs!!!s!J'**03 %#+3#u#!NE!47Jd3i%S/1746Jd3i%S/16L# ND -2$d2',,.3%t3$'E'"%NECK%!d!/;KcU38_,;###&5&!!  #(D(&))&*M49t#*%)L$s)d")GT"&4&
( 
(    r
   N)rM   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   r
   __all__r;   rX   rG   <module>r^      sQ     . 1 3 # BCY($&6 Y(  DY(x .rX   