


'''simple docstring'''




import math


def    UpperCAmelCase_  (       A      ):
   '''simple docstring'''





   if not isinstance(A		,	A      ):
      _a					:  int						=  f'''Input value of [number={number}] must be an integer'''
      raise TypeError(A      )

   if number < 1:
      _a					:  List[str]						=  f'''Input value of [number={number}] must be > 0'''
      raise ValueError(A      )
   elif number == 1:
      return 3
   elif number == 2:
      return 5
   else:
      _a					:  List[str]						=  int(math.log(number // 3		,	2      )      ) + 2

      _a					:  List[Any]						=  [3, 5]
      _a					:  Any						=  2
      _a					:  Union[str, Any]						=  3
      for block in range(1		,	A      ):
         for _ in range(A      ):
            proth_list.append(2 ** (block + 1) + proth_list[proth_index - 1]      )
            proth_index += 1
         increment *= 2

   return proth_list[number - 1]


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 for number in range(11):
  UpperCAmelCase_      :		Any          =		0
  try:
   UpperCAmelCase_      :		List[str]          =		proth(number)
  except ValueError:
   print(f'''ValueError: there is no {number}th Proth number''')
   continue

  print(f'''The {number}th Proth number: {value}''')






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


UpperCAmelCase_      :		int          =		logging.get_logger(__name__)

UpperCAmelCase_      :		Optional[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 					a			(				snake_case__  ):
 '''simple docstring'''




 __lowerCAmelCase						: List[Any]							  =		"""segformer"""




 def __init__(    self		,      lowerCamelCase_=3		,      lowerCamelCase_=4		,      lowerCamelCase_=[2, 2, 2, 2]		,      lowerCamelCase_=[8, 4, 2, 1]		,      lowerCamelCase_=[3_2, 6_4, 1_6_0, 2_5_6]		,      lowerCamelCase_=[7, 3, 3, 3]		,      lowerCamelCase_=[4, 2, 2, 2]		,      lowerCamelCase_=[1, 2, 5, 8]		,      lowerCamelCase_=[4, 4, 4, 4]		,      lowerCamelCase_="gelu"		,      lowerCamelCase_=0.0		,      lowerCamelCase_=0.0		,      lowerCamelCase_=0.1		,      lowerCamelCase_=0.02		,      lowerCamelCase_=0.1		,      lowerCamelCase_=1e-6		,      lowerCamelCase_=2_5_6		,      lowerCamelCase_=2_5_5		,      **lowerCamelCase_		,      )      ->    Union[str, Any]:
    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					:  Union[str, Any]						=  num_channels
    _a					:  Any						=  num_encoder_blocks
    _a					:  Union[str, Any]						=  depths
    _a					:  int						=  sr_ratios
    _a					:  List[str]						=  hidden_sizes
    _a					:  Tuple						=  patch_sizes
    _a					:  Any						=  strides
    _a					:  List[Any]						=  mlp_ratios
    _a					:  str						=  num_attention_heads
    _a					:  str						=  hidden_act
    _a					:  List[Any]						=  hidden_dropout_prob
    _a					:  int						=  attention_probs_dropout_prob
    _a					:  Any						=  classifier_dropout_prob
    _a					:  Optional[Any]						=  initializer_range
    _a					:  int						=  drop_path_rate
    _a					:  int						=  layer_norm_eps
    _a					:  Optional[Any]						=  decoder_hidden_size
    _a					:  int						=  kwargs.get('reshape_last_stage'		,      lowerCamelCase_      )
    _a					:  str						=  semantic_loss_ignore_index







class 					a			(				snake_case__  ):
 '''simple docstring'''




 __lowerCAmelCase						: Any							  =		version.parse("""1.11"""  )




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




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




 @property
 def   __UpperCamelCase   (    self      )      ->    int:
    return 1_2


