


'''simple docstring'''






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_   :      Dict				    =      logging.get_logger(__name__)

a_   :      Dict				    =      {
    "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 	a       (       _SCREAMING_SNAKE_CASE    ):
 _lowerCAmelCase	   =		"""poolformer"""
 def __init__(	self ,			__magic_name__=3 ,			__magic_name__=16 ,			__magic_name__=16 ,			__magic_name__=3 ,			__magic_name__=4.0 ,			__magic_name__=[2, 2, 6, 2] ,			__magic_name__=[64, 1_28, 3_20, 5_12] ,			__magic_name__=[7, 3, 3, 3] ,			__magic_name__=[4, 2, 2, 2] ,			__magic_name__=[2, 1, 1, 1] ,			__magic_name__=4 ,			__magic_name__=0.0 ,			__magic_name__="gelu" ,			__magic_name__=True ,			__magic_name__=1e-5 ,			__magic_name__=0.0_2 ,			**__magic_name__ ,			)   ->							Tuple:
      _a      =							num_channels
      _a      =							patch_size
      _a      =							stride
      _a      =							padding
      _a      =							pool_size
      _a      =							hidden_sizes
      _a      =							mlp_ratio
      _a      =							depths
      _a      =							patch_sizes
      _a      =							strides
      _a      =							num_encoder_blocks
      _a      =							drop_path_rate
      _a      =							hidden_act
      _a      =							use_layer_scale
      _a      =							layer_scale_init_value
      _a      =							initializer_range
      super().__init__(**__magic_name__  )





class 	a       (       _SCREAMING_SNAKE_CASE    ):
 _lowerCAmelCase	   =		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 2e-3





'''simple docstring'''






def 		_A			(lowerCAmelCase__					:int						)				->					int:




     '''simple docstring'''



     assert (
         isinstance(lowerCAmelCase__			,  lowerCAmelCase__						) 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
     _a ,				_a      =							1, 1
     for _ in range(number_of_steps - 1						):
          _a ,				_a      =							current + previous, current
     return current


if __name__ == "__main__":
 import doctest

 doctest.testmod()

