


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

_A		       =						{
    '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     UpperCAmelCase__       (					A_		):



    """simple docstring"""






    UpperCAmelCase__						:		List[str]      =  "poolformer"






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






class     UpperCAmelCase__       (					A_		):



    """simple docstring"""






    UpperCAmelCase__						:		Optional[Any]      =  version.parse("1.11"		)






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






    @property
    def _a					(			self    )  ->       float:
         return 2E-3













def      lowercase__      (     __snake_case    :							int  ):


					'''simple docstring'''


					UpperCAmelCase_    :      list[list[int]]            =						[[0 for _ in range(__snake_case  )] for _ in range(m + 1  )]
					for i in range(m + 1  ):
										UpperCAmelCase_    :      Optional[Any]            =						1

					for n in range(m + 1  ):
										for k in range(1     ,       __snake_case  ):
															memo[n][k] += memo[n][k - 1]
															if n - k > 0:
																				memo[n][k] += memo[n - k - 1][k]

					return memo[m][m - 1]


if __name__ == "__main__":
		import sys

		if len(sys.argv) == 1:
				try:
						__UpperCAmelCase								=						int(input('Enter a number: ').strip())
						print(partition(n))
				except ValueError:
						print('Please enter a number.')
		else:
				try:
						__UpperCAmelCase								=						int(sys.argv[1])
						print(partition(n))
				except ValueError:
						print('Please pass a number.')






