


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


lowercase_	   =     logging.get_logger(__name__)

lowercase_	   =     {
    '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 	A_ (	__UpperCamelCase   ):




      '''simple docstring'''


      __snake_case 	=       """segformer"""




      def __init__(    self:	Tuple						,				a:	Optional[int]=3						,				a:	Optional[int]=4						,				a:	Tuple=[2, 2, 2, 2]						,				a:	Any=[8, 4, 2, 1]						,				a:	List[Any]=[32, 64, 160, 256]						,				a:	Union[str, Any]=[7, 3, 3, 3]						,				a:	List[Any]=[4, 2, 2, 2]						,				a:	str=[1, 2, 5, 8]						,				a:	int=[4, 4, 4, 4]						,				a:	str="gelu"						,				a:	Dict=0.0						,				a:	Any=0.0						,				a:	int=0.1						,				a:	Optional[int]=0.0_2						,				a:	Optional[int]=0.1						,				a:	List[Any]=1e-6						,				a:	List[Any]=256						,				a:	Union[str, Any]=255						,				**a:	Tuple						,				):
       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						,				)

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



class 	A_ (	__UpperCamelCase   ):




      '''simple docstring'''


      __snake_case 	=       version.parse("""1.11"""   )




      @property
      def 					_snake_case     (    self:	Tuple    ):
       return OrderedDict(
           [
               ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
           ]    )




      @property
      def 					_snake_case     (    self:	Tuple    ):
       return 1e-4




      @property
      def 					_snake_case     (    self:	Dict    ):
       return 12





from __future__ import annotations
def 				UpperCamelCase__					(  SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase		:							List[Any]		 =						str(SCREAMING_SNAKE_CASE__						)
 return len(SCREAMING_SNAKE_CASE__						) == 9 and set(SCREAMING_SNAKE_CASE__						) == set('123456789'						)
def 				UpperCamelCase__					(  ):
 for base_num in range(9_999      ,	4_999      ,	-1						):
  __lowerCamelCase		:							Tuple		 =						100_002 * base_num
  if is_9_pandigital(SCREAMING_SNAKE_CASE__						):
   return candidate

 for base_num in range(333      ,	99      ,	-1						):
  __lowerCamelCase		:							Union[str, Any]		 =						1_002_003 * base_num
  if is_9_pandigital(SCREAMING_SNAKE_CASE__						):
   return candidate

 return None


if __name__ == "__main__":
       print(F"""{solution() = }""")

