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

__lowerCamelCase			: 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				(						lowerCamelCase_		):
   lowerCAmelCase_														=							"poolformer"




   def __init__(    self			:				Optional[Any]       ,	_lowercase			:				List[str]=3       ,	_lowercase			:				int=16       ,	_lowercase			:				Dict=16       ,	_lowercase			:				List[Any]=3       ,	_lowercase			:				Any=4.0       ,	_lowercase			:				str=[2, 2, 6, 2]       ,	_lowercase			:				str=[64, 1_28, 3_20, 5_12]       ,	_lowercase			:				Union[str, Any]=[7, 3, 3, 3]       ,	_lowercase			:				Optional[Any]=[4, 2, 2, 2]       ,	_lowercase			:				Tuple=[2, 1, 1, 1]       ,	_lowercase			:				Any=4       ,	_lowercase			:				Dict=0.0       ,	_lowercase			:				Optional[int]="gelu"       ,	_lowercase			:				Dict=True       ,	_lowercase			:				Union[str, Any]=1E-5       ,	_lowercase			:				List[str]=0.02       ,	**_lowercase			:				List[str]       ,	):



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







class __snake_case				(						lowerCamelCase_		):
   lowerCAmelCase_														=							version.parse("1.11"		)




   @property
   def 	__a						(    self			:				Any      ):



     """simple docstring"""






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




   @property
   def 	__a						(    self			:				str      ):



     """simple docstring"""






     return 2E-3

def 	__SCREAMING_SNAKE_CASE  (					__UpperCamelCase    :       int ,     __UpperCamelCase    :       int	)							->					str:







  """simple docstring"""





  if a < 0 or b < 0:
    raise ValueError("""the value of both inputs must be positive"""	)

  SCREAMING_SNAKE_CASE__										=      str(bin(__UpperCamelCase	)	)[2:]  # remove the leading "0b"
  SCREAMING_SNAKE_CASE__										=      str(bin(__UpperCamelCase	)	)[2:]  # remove the leading "0b"

  SCREAMING_SNAKE_CASE__										=      max(len(__UpperCamelCase	) ,     len(__UpperCamelCase	)	)

  return "0b" + "".join(
      str(int(char_a != char_b	)	)
      for char_a, char_b in zip(a_binary.zfill(__UpperCamelCase	) ,     b_binary.zfill(__UpperCamelCase	)	)	)


if __name__ == "__main__":
   import doctest

   doctest.testmod()
