
    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FocalNet model configuration    )strict   )BackboneConfigMixin)PreTrainedConfig)auto_docstringzmicrosoft/focalnet-tiny)
checkpointc                   (  ^  \ rS rSr% SrSrSr\\\   -  \	\\4   -  \
S'   Sr\\\   -  \	\\4   -  \
S'   Sr\\
S	'   S
r\\
S'   Sr\\
S'   Sr\\   \	\S4   -  \
S'   Sr\\   \	\S4   -  \
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+r"\\   S+-  \
S,'   S+r#\\   S+-  \
S-'   U 4S. jr$S/r%U =r&$ )0FocalNetConfig   a  
use_conv_embed (`bool`, *optional*, defaults to `False`):
    Whether to use convolutional embedding. The authors noted that using convolutional embedding usually
    improve the performance, but it's not used by default.
focal_levels (`list(int)`, *optional*, defaults to `[2, 2, 2, 2]`):
    Number of focal levels in each layer of the respective stages in the encoder.
focal_windows (`list(int)`, *optional*, defaults to `[3, 3, 3, 3]`):
    Focal window size in each layer of the respective stages in the encoder.
hidden_dropout_prob (`float`, *optional*, defaults to 0.0):
    The dropout probability for all fully connected layers in the embeddings and encoder.
use_layerscale (`bool`, *optional*, defaults to `False`):
    Whether to use layer scale in the encoder.
layerscale_value (`float`, *optional*, defaults to 0.0001):
    The initial value of the layer scale.
use_post_layernorm (`bool`, *optional*, defaults to `False`):
    Whether to use post layer normalization in the encoder.
use_post_layernorm_in_modulation (`bool`, *optional*, defaults to `False`):
    Whether to use post layer normalization in the modulation layer.
normalize_modulator (`bool`, *optional*, defaults to `False`):
    Whether to normalize the modulator.
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 FocalNetConfig, FocalNetModel

>>> # Initializing a FocalNet microsoft/focalnet-tiny style configuration
>>> configuration = FocalNetConfig()

>>> # Initializing a model (with random weights) from the microsoft/focalnet-tiny style configuration
>>> model = FocalNetModel(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```focalnet   
image_size   
patch_sizer   num_channels`   	embed_dimFuse_conv_embed)   i     r   .hidden_sizes)   r      r   depths)r   r   r   r   focal_levels)r   r   r   r   focal_windowsgelu
hidden_actg      @	mlp_ratiog        hidden_dropout_probg?drop_path_rateuse_layerscaleg-C6?layerscale_valueuse_post_layernorm use_post_layernorm_in_modulationnormalize_modulatorg{Gz?initializer_rangegh㈵>layer_norm_eps    encoder_strideN_out_features_out_indicesc                   > 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 )Nstem   stageout_indicesout_features)r1   r2    )rangelenr   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/focalnet/configuration_focalnet.pyr:   FocalNetConfig.__post_init__Z   s    "8aT[[IY\]I]@^&_@^se}@^&__//

=$7fjjQ_aeFf 	0 	
 	''	 '`s   B)r6   )'__name__
__module____qualname____firstlineno____doc__
model_typer   intlisttuple__annotations__r   r   r   r   boolr   r   r   r   r   strr   floatr    r!   r"   r#   r$   r%   r&   r'   r(   r*   r+   r,   r:   __static_attributes____classcell__)r>   s   @r?   r
   r
      s   $L J47Jd3i%S/1745Jd3i%S/15L#Is ND 0DL$s)eCHo-D*6FDIc3h'60<L$s)eCHo-<1=M49uS#X.=JIu'**"%NECK% ND "e"$$-2$d2 %%#u# NE NC&*M49t#*%)L$s)d")( (    r
   N)rE   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   r
   __all__r3   rP   r?   <module>rV      sQ    # . 1 3 # 45F((*: F(  6F(R 
rP   