




'''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


__UpperCamelCase      :       Optional[Any]      			=      logging.get_logger(__name__)

__UpperCamelCase      :       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 							__SCREAMING_SNAKE_CASE       (							_lowerCAmelCase     ):
      __a  					="poolformer"




      def __init__(  self ,   lowerCamelCase=3 ,   lowerCamelCase=16 ,   lowerCamelCase=16 ,   lowerCamelCase=3 ,   lowerCamelCase=4.0 ,   lowerCamelCase=[2, 2, 6, 2] ,   lowerCamelCase=[64, 128, 320, 512] ,   lowerCamelCase=[7, 3, 3, 3] ,   lowerCamelCase=[4, 2, 2, 2] ,   lowerCamelCase=[2, 1, 1, 1] ,   lowerCamelCase=4 ,   lowerCamelCase=0.0 ,   lowerCamelCase="gelu" ,   lowerCamelCase=True ,   lowerCamelCase=1e-5 ,   lowerCamelCase=0.02 ,   **lowerCamelCase ,   )							->str:



         '''simple docstring'''
         __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__(**lowerCamelCase      )







class 							__SCREAMING_SNAKE_CASE       (							_lowerCAmelCase     ):
      __a  					=version.parse("1.11"     )




      @property
      def  __UpperCamelCase							(  self      )							->Mapping[str, Mapping[int, str]]:



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






      @property
      def  __UpperCamelCase							(  self      )							->float:



         '''simple docstring'''
         return 2e-3







'''simple docstring'''



def    __UpperCAmelCase	(				SCREAMING_SNAKE_CASE__:	int    )  ->			bool:

   """simple docstring"""
   return number & 1 == 0


if __name__ == "__main__":
 import doctest

 doctest.testmod()