

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      		=     logging.get_logger(__name__)

__A      		=     {
    '''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   lowercase_   (  __lowercase					):
      UpperCamelCase_      :		Tuple										=    "segformer"



      def __init__(      self				:    Union[str, Any]      , A__				:    Union[str, Any]=3      , A__				:    int=4      , A__				:    Optional[Any]=[2, 2, 2, 2]      , A__				:    int=[8, 4, 2, 1]      , A__				:    int=[32, 64, 160, 256]      , A__				:    Tuple=[7, 3, 3, 3]      , A__				:    Optional[Any]=[4, 2, 2, 2]      , A__				:    List[Any]=[1, 2, 5, 8]      , A__				:    Tuple=[4, 4, 4, 4]      , A__				:    int="gelu"      , A__				:    Tuple=0.0      , A__				:    List[str]=0.0      , A__				:    Union[str, Any]=0.1      , A__				:    Any=0.02      , A__				:    str=0.1      , A__				:    List[str]=1e-6      , A__				:    Optional[int]=256      , A__				:    Optional[int]=255      , **A__				:    Optional[Any]      , )   ->					Dict:
        super().__init__(**A__		)

        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.'''      , A__      , )

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



class   lowercase_   (  __lowercase					):
      UpperCamelCase_      :		Any										=    version.parse("1.11"					)



      @property
      def 						UpperCamelCase_		(      self				:    Dict		)   ->					Mapping[str, Mapping[int, str]]:
        return OrderedDict(
            [
                ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
            ]		)



      @property
      def 						UpperCamelCase_		(      self				:    Dict		)   ->					float:
        return 1e-4







      @property
      def 						UpperCamelCase_		(      self				:    int		)   ->					int:
        return 12




import warnings

from ...utils import logging
from .image_processing_deformable_detr import DeformableDetrImageProcessor


__A      		=     logging.get_logger(__name__)



class   lowercase_   (  __lowercase					):



      def __init__(      self				:    Optional[Any]      , *A__				:    List[Any]      , **A__				:    int		)   ->					None:
        warnings.warn(
            '''The class DeformableDetrFeatureExtractor is deprecated and will be removed in version 5 of Transformers.'''
            ''' Please use DeformableDetrImageProcessor instead.'''      , A__      , )
        super().__init__(*A__      , **A__		)

