



"""simple docstring"""
import warnings
from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


A:   Tuple								=		logging.get_logger(__name__)

A:   List[Any]								=		{
    "nvidia/segformer-b0-finetuned-ade-512-512": (
        "https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512/resolve/main/config.json"
    ),
    # See all SegFormer models at https://huggingface.co/models?filter=segformer
}



class       SCREAMING_SNAKE_CASE__  (					UpperCAmelCase__ ):
   __lowerCAmelCase  :   int						=						'segformer'

   def __init__(   self      ,     _SCREAMING_SNAKE_CASE=3      ,     _SCREAMING_SNAKE_CASE=4      ,     _SCREAMING_SNAKE_CASE=[2, 2, 2, 2]      ,     _SCREAMING_SNAKE_CASE=[8, 4, 2, 1]      ,     _SCREAMING_SNAKE_CASE=[32, 64, 160, 256]      ,     _SCREAMING_SNAKE_CASE=[7, 3, 3, 3]      ,     _SCREAMING_SNAKE_CASE=[4, 2, 2, 2]      ,     _SCREAMING_SNAKE_CASE=[1, 2, 5, 8]      ,     _SCREAMING_SNAKE_CASE=[4, 4, 4, 4]      ,     _SCREAMING_SNAKE_CASE="gelu"      ,     _SCREAMING_SNAKE_CASE=0.0      ,     _SCREAMING_SNAKE_CASE=0.0      ,     _SCREAMING_SNAKE_CASE=0.1      ,     _SCREAMING_SNAKE_CASE=0.02      ,     _SCREAMING_SNAKE_CASE=0.1      ,     _SCREAMING_SNAKE_CASE=1E-6      ,     _SCREAMING_SNAKE_CASE=256      ,     _SCREAMING_SNAKE_CASE=255      ,     **_SCREAMING_SNAKE_CASE      ,     )  ->      Union[str, Any]:





    '''simple docstring'''




    super().__init__(**_SCREAMING_SNAKE_CASE						)

    if "reshape_last_stage" in kwargs and kwargs["reshape_last_stage"] is False:
     warnings.warn(
         """Reshape_last_stage is set to False in this config. This argument is deprecated and will soon be"""
         """ removed, as the behaviour will default to that of reshape_last_stage = True."""      ,     _SCREAMING_SNAKE_CASE      ,     )

    UpperCAmelCase	:					Dict	=	num_channels
    UpperCAmelCase	:					Optional[Any]	=	num_encoder_blocks
    UpperCAmelCase	:					Optional[Any]	=	depths
    UpperCAmelCase	:					Dict	=	sr_ratios
    UpperCAmelCase	:					Any	=	hidden_sizes
    UpperCAmelCase	:					Any	=	patch_sizes
    UpperCAmelCase	:					Union[str, Any]	=	strides
    UpperCAmelCase	:					Optional[Any]	=	mlp_ratios
    UpperCAmelCase	:					Optional[Any]	=	num_attention_heads
    UpperCAmelCase	:					Tuple	=	hidden_act
    UpperCAmelCase	:					List[str]	=	hidden_dropout_prob
    UpperCAmelCase	:					Dict	=	attention_probs_dropout_prob
    UpperCAmelCase	:					Optional[Any]	=	classifier_dropout_prob
    UpperCAmelCase	:					List[Any]	=	initializer_range
    UpperCAmelCase	:					List[str]	=	drop_path_rate
    UpperCAmelCase	:					int	=	layer_norm_eps
    UpperCAmelCase	:					Optional[Any]	=	decoder_hidden_size
    UpperCAmelCase	:					int	=	kwargs.get("""reshape_last_stage"""      ,     _SCREAMING_SNAKE_CASE						)
    UpperCAmelCase	:					str	=	semantic_loss_ignore_index



class       SCREAMING_SNAKE_CASE__  (					UpperCAmelCase__ ):
   __lowerCAmelCase  :   List[str]						=						version.parse('1.11' )

   @property
   def 	SCREAMING_SNAKE_CASE     (   self						)  ->      Mapping[str, Mapping[int, str]]:





    '''simple docstring'''




    return OrderedDict(
        [
            ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
        ]						)

   @property
   def 	SCREAMING_SNAKE_CASE     (   self						)  ->      float:





    '''simple docstring'''




    return 1E-4




   @property
   def 	SCREAMING_SNAKE_CASE     (   self						)  ->      int:





    '''simple docstring'''




    return 12



from abc import ABC, abstractmethod
from argparse import ArgumentParser







class  lowercase				(       lowercase_			):




				@staticmethod
				@abstractmethod
				def     a							(					snake_case       ):
											raise NotImplementedError()




				@abstractmethod
				def     a							(					self       ):
											raise NotImplementedError()




