
    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$Swin Transformer model configuration    )strict   )BackboneConfigMixin)PreTrainedConfig)auto_docstringz&microsoft/swin-tiny-patch4-window7-224)
checkpointc                     ^  \ rS rSr% SrSrSSS.rSr\\	\   -  \
\\4   -  \S'   S	r\\	\   -  \
\\4   -  \S
'   Sr\\S'   Sr\\S'   Sr\	\   \
\S4   -  \S'   Sr\	\   \
\S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#'   S$r\\S%'   S&r\\S''   S(r\	\   S(-  \S)'   S(r \	\   S(-  \S*'   U 4S+ jr!S,r"U =r#$ )-
SwinConfig   a~  
depths (`list(int)`, *optional*, defaults to `[2, 2, 6, 2]`):
    Depth of each layer in the Transformer encoder.
num_heads (`list(int)`, *optional*, defaults to `[3, 6, 12, 24]`):
    Number of attention heads in each layer of the Transformer encoder.
window_size (`int`, *optional*, defaults to 7):
    Size of windows.
encoder_stride (`int`, *optional*, defaults to 32):
    Factor to increase the spatial resolution by in the decoder head for masked image modeling.

Example:

```python
>>> from transformers import SwinConfig, SwinModel

>>> # Initializing a Swin microsoft/swin-tiny-patch4-window7-224 style configuration
>>> configuration = SwinConfig()

>>> # Initializing a model (with random weights) from the microsoft/swin-tiny-patch4-window7-224 style configuration
>>> model = SwinModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```swin	num_heads
num_layers)num_attention_headsnum_hidden_layers   
image_size   
patch_sizer   num_channels`   	embed_dim)   r      r   .depths)r   r            window_sizeg      @	mlp_ratioTqkv_biasg        hidden_dropout_probattention_probs_dropout_probg?drop_path_rategelu
hidden_actFuse_absolute_embeddingsg{Gz?initializer_rangegh㈵>layer_norm_eps    encoder_strideN_out_features_out_indicesc                   > [        U R                  5      U l        [        U R                  S[        U R                  5      S-
  -  -  5      U l        S/[        S[        U R                  5      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 )	Nr      stemstageout_indicesout_features)r1   r2    )lenr   r   intr   hidden_sizerangestage_names"set_output_features_output_indicespopsuper__post_init__)selfkwargsidx	__class__s      |/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/swin/configuration_swin.pyr<   SwinConfig.__post_init__N   s    dkk* t~~c$++6F6J0KKL"8aT[[IY\]I]@^&_@^se}@^&__//

=$7fjjQ_aeFf 	0 	
 	''	 '`s   8C)r6   r   r8   )$__name__
__module____qualname____firstlineno____doc__
model_typeattribute_mapr   r5   listtuple__annotations__r   r   r   r   r   r   r   floatr    boolr!   r"   r#   r%   strr&   r'   r(   r*   r+   r,   r<   __static_attributes____classcell__)r@   s   @rA   r
   r
      sZ   2 J  +)M
 58Jd3i%S/1745Jd3i%S/15L#Is*6FDIc3h'6-;ItCy5c?*;K Ius{ Hd'**03 %#+3"%NECK%J$)T)#u# NE NC&*M49t#*%)L$s)d")	( 	(    r
   N)rG   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   r
   __all__r3   rR   rA   <module>rX      sN    + . 1 3 # CD>($&6 >(  E>(B .rR   