


"""simple docstring"""





def   lowerCAmelCase_( SCREAMING_SNAKE_CASE					)					->	int:
    """simple docstring"""

    assert (
        isinstance(SCREAMING_SNAKE_CASE ,	SCREAMING_SNAKE_CASE					) and number_of_steps > 0
    ), F'number_of_steps needs to be positive integer, your input {number_of_steps}'
    if number_of_steps == 1:
        return 1
    UpperCamelCase__       ,						UpperCamelCase__         =    1, 1
    for _ in range(number_of_steps - 1					):
        UpperCamelCase__       ,						UpperCamelCase__         =    current + previous, current
    return current


if __name__ == "__main__":
  import doctest

  doctest.testmod()












"""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__					: str=	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    __lowerCamelCase    (  _a  ):
   a      :				Any 						="""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.02 ,				snake_case_=0.1 ,				snake_case_=1E-6 ,				snake_case_=256 ,				snake_case_=255 ,				**snake_case_ ,				)		->       Tuple:
       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__         =    num_channels
       UpperCamelCase__         =    num_encoder_blocks
       UpperCamelCase__         =    depths
       UpperCamelCase__         =    sr_ratios
       UpperCamelCase__         =    hidden_sizes
       UpperCamelCase__         =    patch_sizes
       UpperCamelCase__         =    strides
       UpperCamelCase__         =    mlp_ratios
       UpperCamelCase__         =    num_attention_heads
       UpperCamelCase__         =    hidden_act
       UpperCamelCase__         =    hidden_dropout_prob
       UpperCamelCase__         =    attention_probs_dropout_prob
       UpperCamelCase__         =    classifier_dropout_prob
       UpperCamelCase__         =    initializer_range
       UpperCamelCase__         =    drop_path_rate
       UpperCamelCase__         =    layer_norm_eps
       UpperCamelCase__         =    decoder_hidden_size
       UpperCamelCase__         =    kwargs.get('reshape_last_stage' ,				snake_case_      )
       UpperCamelCase__         =    semantic_loss_ignore_index







class    __lowerCamelCase    (  _a  ):
   a      :				Any 						=version.parse("""1.11"""  )

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

   @property
   def 						SCREAMING_SNAKE_CASE__ (					self      )		->       float:
       return 1E-4







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




