'''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


SCREAMING_SNAKE_CASE_	   =			logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_	   =			{
    '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 (       __lowerCAmelCase				):



  """simple docstring"""
  __lowerCAmelCase				      =					"""segformer"""







  def __init__(							self   ,    snake_case_=3   ,    snake_case_=4   ,    snake_case_=[2, 2, 2, 2]   ,    snake_case_=[8, 4, 2, 1]   ,    snake_case_=[32, 64, 160, 256]   ,    snake_case_=[7, 3, 3, 3]   ,    snake_case_=[4, 2, 2, 2]   ,    snake_case_=[1, 2, 5, 8]   ,    snake_case_=[4, 4, 4, 4]   ,    snake_case_="gelu"   ,    snake_case_=0.0   ,    snake_case_=0.0   ,    snake_case_=0.1   ,    snake_case_=0.0_2   ,    snake_case_=0.1   ,    snake_case_=1e-6   ,    snake_case_=256   ,    snake_case_=255   ,    **snake_case_   ,    ):

    '''simple docstring'''







    super().__init__(**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."""   ,    snake_case_   ,    )

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




class    a (       __lowerCAmelCase				):



  """simple docstring"""
  __lowerCAmelCase				      =					version.parse("""1.11"""				)







  @property
  def    lowercase_  (							self					):

    '''simple docstring'''







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







  @property
  def    lowercase_  (							self					):

    '''simple docstring'''







    return 1e-4







  @property
  def    lowercase_  (							self					):

    '''simple docstring'''







    return 12
'''simple docstring'''






from __future__ import annotations

SCREAMING_SNAKE_CASE_	   =			10






def  UpperCamelCase__					(					_lowercase    :				list[int]     )							->	list[int]:
  __UpperCAmelCase:					Union[str, Any]		= 1
  __UpperCAmelCase:					Optional[Any]		= max(_lowercase     )
  while placement <= max_digit:
    # declare and initialize empty buckets
    __UpperCAmelCase:					list[list]		= [[] for _ in range(_lowercase     )]
    # split list_of_ints between the buckets
    for i in list_of_ints:
      __UpperCAmelCase:					Optional[Any]		= int((i / placement) % RADIX     )
      buckets[tmp].append(_lowercase     )
    # put each buckets' contents into list_of_ints
    __UpperCAmelCase:					Optional[int]		= 0
    for b in range(_lowercase     ):
      for i in buckets[b]:
        __UpperCAmelCase:					str		= i
        a += 1
        # move to next
    placement *= RADIX
  return list_of_ints


if __name__ == "__main__":
    import doctest

    doctest.testmod()