





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


snake_case_				=			logging.get_logger(__name__)

snake_case_				=			{
    '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__				(       _UpperCAmelCase  ):
      A_						:				Optional[int]							=    'poolformer'


      def __init__(self       :      Optional[Any]				,			a__       :      int=3				,			a__       :      Union[str, Any]=16				,			a__       :      Tuple=16				,			a__       :      List[Any]=3				,			a__       :      List[str]=4.0				,			a__       :      Optional[int]=[2, 2, 6, 2]				,			a__       :      str=[64, 128, 320, 512]				,			a__       :      int=[7, 3, 3, 3]				,			a__       :      Optional[int]=[4, 2, 2, 2]				,			a__       :      Optional[int]=[2, 1, 1, 1]				,			a__       :      List[Any]=4				,			a__       :      Any=0.0				,			a__       :      Dict="gelu"				,			a__       :      Tuple=True				,			a__       :      Optional[Any]=1E-5				,			a__       :      str=0.0_2				,			**a__       :      Dict				,			):





         """simple docstring"""



         __snake_case							       =   num_channels
         __snake_case							       =   patch_size
         __snake_case							       =   stride
         __snake_case							       =   padding
         __snake_case							       =   pool_size
         __snake_case							       =   hidden_sizes
         __snake_case							       =   mlp_ratio
         __snake_case							       =   depths
         __snake_case							       =   patch_sizes
         __snake_case							       =   strides
         __snake_case							       =   num_encoder_blocks
         __snake_case							       =   drop_path_rate
         __snake_case							       =   hidden_act
         __snake_case							       =   use_layer_scale
         __snake_case							       =   layer_scale_init_value
         __snake_case							       =   initializer_range
         super().__init__(**a__      )






class 		SCREAMING_SNAKE_CASE__				(       _UpperCAmelCase  ):
      A_						:				List[Any]							=    version.parse('1.11'  )


      @property
      def    a (self       :      Union[str, Any]      ):





         """simple docstring"""



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


      @property
      def    a (self       :      int      ):





         """simple docstring"""



         return 2E-3









"""simple docstring"""



from ...utils import is_torch_available, is_transformers_available


if is_transformers_available() and is_torch_available():
						from .pipeline_vq_diffusion import LearnedClassifierFreeSamplingEmbeddings, VQDiffusionPipeline



