




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


__UpperCamelCase					:       List[str]    					=      logging.get_logger(__name__)

__UpperCamelCase					:       Optional[int]    					=      {
    "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 		__lowerCAmelCase	(	__a ):
							UpperCamelCase__					     =  '''segformer'''
							def __init__(						self						:Optional[int]		,      __magic_name__						:int=3		,      __magic_name__						:List[Any]=4		,      __magic_name__						:List[str]=[2, 2, 2, 2]		,      __magic_name__						:str=[8, 4, 2, 1]		,      __magic_name__						:str=[32, 64, 160, 256]		,      __magic_name__						:Optional[Any]=[7, 3, 3, 3]		,      __magic_name__						:str=[4, 2, 2, 2]		,      __magic_name__						:Dict=[1, 2, 5, 8]		,      __magic_name__						:Dict=[4, 4, 4, 4]		,      __magic_name__						:str="gelu"		,      __magic_name__						:Union[str, Any]=0.0		,      __magic_name__						:Any=0.0		,      __magic_name__						:List[str]=0.1		,      __magic_name__						:Optional[Any]=0.02		,      __magic_name__						:Optional[Any]=0.1		,      __magic_name__						:List[Any]=1E-6		,      __magic_name__						:Optional[int]=256		,      __magic_name__						:Any=255		,      **__magic_name__						:Optional[int]		,      ):







								'''simple docstring'''







								super().__init__(**lowerCAmelCase__				)

								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."""		,      lowerCAmelCase__		,      )

								a										=							num_channels
								a										=							num_encoder_blocks
								a										=							depths
								a										=							sr_ratios
								a										=							hidden_sizes
								a										=							patch_sizes
								a										=							strides
								a										=							mlp_ratios
								a										=							num_attention_heads
								a										=							hidden_act
								a										=							hidden_dropout_prob
								a										=							attention_probs_dropout_prob
								a										=							classifier_dropout_prob
								a										=							initializer_range
								a										=							drop_path_rate
								a										=							layer_norm_eps
								a										=							decoder_hidden_size
								a										=							kwargs.get("""reshape_last_stage"""		,      lowerCAmelCase__				)
								a										=							semantic_loss_ignore_index







class 		__lowerCAmelCase	(	__a ):
							UpperCamelCase__					     =  version.parse('''1.11''' )
							@property
							def       lowerCamelCase__							(						self						:List[Any]				):







								'''simple docstring'''







								return OrderedDict(
								    [
								        ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
								    ]				)
							@property
							def       lowerCamelCase__							(						self						:List[str]				):







								'''simple docstring'''







								return 1E-4





							@property
							def       lowerCamelCase__							(						self						:Any				):







								'''simple docstring'''







								return 12



"""simple docstring"""





import warnings

from ...utils import logging
from .image_processing_yolos import YolosImageProcessor


__magic_name__       =			logging.get_logger(__name__)
class 						SCREAMING_SNAKE_CASE_ (						__a ):




		"""simple docstring"""





		def __init__(     self							,  *lowerCAmelCase__							,  **lowerCAmelCase__):
				warnings.warn(
				    """The class YolosFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"""
				    """ use YolosImageProcessor instead."""							,  lowerCAmelCase__							,  )
				super().__init__(*lowerCAmelCase__							,  **lowerCAmelCase__)




