





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					:				Optional[int]				=			{
    """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 					__snake_case	(  __SCREAMING_SNAKE_CASE    ):


    '''simple docstring'''







    lowerCamelCase__    :		Optional[Any]				=	"""poolformer"""



    def __init__(       self   ,				A_=3   ,				A_=16   ,				A_=16   ,				A_=3   ,				A_=4.0   ,				A_=[2, 2, 6, 2]   ,				A_=[64, 1_28, 3_20, 5_12]   ,				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_   ,				):





        '''simple docstring'''

        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__(**A_     )





class 					__snake_case	(  __SCREAMING_SNAKE_CASE    ):


    '''simple docstring'''







    lowerCamelCase__    :		int				=	version.parse("""1.11"""    )



    @property
    def  lowercase_					(       self     ):





        '''simple docstring'''

        return OrderedDict(
            [
                ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
            ]     )




    @property
    def  lowercase_					(       self     ):





        '''simple docstring'''

        return 2E-3




a			:			Any												=					[sum(int(c, 10) ** 2 for c in i.__str__()) for i in range(100000)]


def 		lowercase_	(  _UpperCamelCase	):


			'''simple docstring'''







			__lowercase			       = 0
			while number:
						# Increased Speed Slightly by checking every 5 digits together.
						sum_of_digits_squared += DIGITS_SQUARED[number % 10_00_00]
						number //= 10_00_00

			return sum_of_digits_squared


# There are 2 Chains made,
# One ends with 89 with the chain member 58 being the one which when declared first,
# there will be the least number of iterations for all the members to be checked.

# The other one ends with 1 and has only one element 1.

# So 58 and 1 are chosen to be declared at the starting.

# Changed dictionary to an array to quicken the solution
a			:			list[bool | None]												=					[None] * 10000000
a			:			int												=					True
a			:			Any												=					False


def 		lowercase_	(  _UpperCamelCase	):


			'''simple docstring'''







			if CHAINS[number - 1] is not None:
						return CHAINS[number - 1]  # type: ignore

			__lowercase			       = chain(next_number(_UpperCamelCase	)	)
			__lowercase			       = number_chain

			while number < 10_00_00_00:
						__lowercase			       = number_chain
						number *= 10

			return number_chain


def 		lowercase_	(  _UpperCamelCase = 10_00_00_00	):


			'''simple docstring'''







			for i in range(1							,      _UpperCamelCase	):
						if CHAINS[i] is None:
									chain(i + 1	)

			return CHAINS[:number].count(_UpperCamelCase	)


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	print(f'''{solution() = }''')


