




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


lowerCamelCase__					:  List[str]      							=				logging.get_logger(__name__)

lowerCamelCase__					:  Union[str, Any]      							=				{
    'sail/poolformer_s12': 'https://huggingface.co/sail/poolformer_s12/resolve/main/config.json',
    # See all PoolFormer models at https://huggingface.co/models?filter=poolformer
}





class 			lowerCamelCase_				( _SCREAMING_SNAKE_CASE   ):


 '''simple docstring'''







 lowercase_							       =       "poolformer"



 def __init__(				self    :						List[Any]							,							_lowerCAmelCase    :						Optional[int]=3							,							_lowerCAmelCase    :						int=16							,							_lowerCAmelCase    :						Union[str, Any]=16							,							_lowerCAmelCase    :						Any=3							,							_lowerCAmelCase    :						str=4.0							,							_lowerCAmelCase    :						List[Any]=[2, 2, 6, 2]							,							_lowerCAmelCase    :						Optional[Any]=[64, 128, 320, 512]							,							_lowerCAmelCase    :						Optional[Any]=[7, 3, 3, 3]							,							_lowerCAmelCase    :						Union[str, Any]=[4, 2, 2, 2]							,							_lowerCAmelCase    :						Optional[int]=[2, 1, 1, 1]							,							_lowerCAmelCase    :						List[str]=4							,							_lowerCAmelCase    :						Tuple=0.0							,							_lowerCAmelCase    :						str="gelu"							,							_lowerCAmelCase    :						str=True							,							_lowerCAmelCase    :						Dict=1E-5							,							_lowerCAmelCase    :						Optional[Any]=0.02							,							**_lowerCAmelCase    :						Optional[Any]							,							):
       SCREAMING_SNAKE_CASE_      		=     num_channels
       SCREAMING_SNAKE_CASE_      		=     patch_size
       SCREAMING_SNAKE_CASE_      		=     stride
       SCREAMING_SNAKE_CASE_      		=     padding
       SCREAMING_SNAKE_CASE_      		=     pool_size
       SCREAMING_SNAKE_CASE_      		=     hidden_sizes
       SCREAMING_SNAKE_CASE_      		=     mlp_ratio
       SCREAMING_SNAKE_CASE_      		=     depths
       SCREAMING_SNAKE_CASE_      		=     patch_sizes
       SCREAMING_SNAKE_CASE_      		=     strides
       SCREAMING_SNAKE_CASE_      		=     num_encoder_blocks
       SCREAMING_SNAKE_CASE_      		=     drop_path_rate
       SCREAMING_SNAKE_CASE_      		=     hidden_act
       SCREAMING_SNAKE_CASE_      		=     use_layer_scale
       SCREAMING_SNAKE_CASE_      		=     layer_scale_init_value
       SCREAMING_SNAKE_CASE_      		=     initializer_range
       super().__init__(**_lowerCAmelCase		)





class 			lowerCamelCase_				( _SCREAMING_SNAKE_CASE   ):


 '''simple docstring'''







 lowercase_							       =       version.parse("1.11"   )



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




 @property
 def  lowerCAmelCase_    (				self    :						List[Any]		):
       return 2E-3
'''simple docstring'''




def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							)      ->       float:
    return base * power(UpperCamelCase__							,    (exponent - 1)							) if exponent else 1


if __name__ == "__main__":
  print("Raise base to the power of exponent using recursion...")
  __UpperCAmelCase					=int(input("Enter the base: ").strip())
  __UpperCAmelCase					=int(input("Enter the exponent: ").strip())
  __UpperCAmelCase					=power(base, abs(exponent))
  if exponent < 0:  # power() does not properly deal w/ negative exponents
    __UpperCAmelCase					=1 / result
  print(f'{base} to the power of {exponent} is {result}')
