
    Z j                     |    S r SSKJ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UperNet model configuration    )strict   )%consolidate_backbone_kwargs_to_config)PreTrainedConfig)auto_docstring   )
AutoConfigzopenmmlab/upernet-convnext-tiny)
checkpointc                      ^  \ rS rSr% SrSrS\0rSr\	\
-  S-  \S'   Sr\\S'   Sr\\S	'   S
r\\   \\S4   -  \S'   Sr\\S'   Sr\\S'   Sr\S-  \S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   U 4S jrSrU =r$ )UperNetConfig   ao  
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_in_channels (`int`, *optional*, defaults to 256):
    Number of input channels in 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.
loss_ignore_index (`int`, *optional*, defaults to 255):
    The index that is ignored by the loss function.

Examples:

```python
>>> from transformers import UperNetConfig, UperNetForSemanticSegmentation

>>> # Initializing a configuration
>>> configuration = UperNetConfig()

>>> # Initializing a model (with random weights) from the configuration
>>> model = UperNetForSemanticSegmentation(configuration)

>>> # Accessing the model configuration
>>> configuration = model.config
```upernetbackbone_configNi   hidden_sizeg{Gz?initializer_range)   r   r      .pool_scalesTuse_auxiliary_headg?auxiliary_loss_weightauxiliary_in_channels   auxiliary_channelsr   auxiliary_num_convsFauxiliary_concat_input   loss_ignore_indexc                 p   > [        SU R                  SS/ SQ0S.UD6u  U l        n[        TU ]  " S0 UD6  g )Nresnetout_features)stage1stage2stage3stage4)r   default_config_typedefault_config_kwargs )r   r   super__post_init__)selfkwargs	__class__s     ڂ/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/upernet/configuration_upernet.pyr)   UperNetConfig.__post_init__K   sM    'L (
 00 ( H#(
 (
$f 	''    )r   )__name__
__module____qualname____firstlineno____doc__
model_typer	   sub_configsr   dictr   __annotations__r   intr   floatr   listtupler   boolr   r   r   r   r   r   r)   __static_attributes____classcell__)r,   s   @r-   r   r      s    B J$j1K6:OT,,t3:K#u#/;KcU38_,;###&5&(,3:,!!  #(D( s 	( 	(r/   r   N)r4   huggingface_hub.dataclassesr   backbone_utilsr   configuration_utilsr   utilsr   auto.configuration_autor	   r   __all__r'   r/   r-   <module>rF      sN    " . C 3 # 0 <=:($ :(  >:(z 
r/   