


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

UpperCAmelCase   		=      {
    '''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        __magic_name__		(      a_  ):
       __A      :   int   	= "poolformer"






       def __init__( self	:     List[Any]	,  snake_case__	:     Tuple=3	,  snake_case__	:     Tuple=1_6	,  snake_case__	:     Any=1_6	,  snake_case__	:     List[str]=3	,  snake_case__	:     Union[str, Any]=4.0	,  snake_case__	:     Optional[Any]=[2, 2, 6, 2]	,  snake_case__	:     Dict=[6_4, 1_2_8, 3_2_0, 5_1_2]	,  snake_case__	:     int=[7, 3, 3, 3]	,  snake_case__	:     str=[4, 2, 2, 2]	,  snake_case__	:     Any=[2, 1, 1, 1]	,  snake_case__	:     Dict=4	,  snake_case__	:     Union[str, Any]=0.0	,  snake_case__	:     Union[str, Any]="gelu"	,  snake_case__	:     Tuple=True	,  snake_case__	:     List[Any]=1e-5	,  snake_case__	:     Tuple=0.02	,  **snake_case__	:     Optional[Any]	,  ):

              '''simple docstring'''






              lowercase		:Union[str, Any]											=					num_channels
              lowercase		:List[str]											=					patch_size
              lowercase		:str											=					stride
              lowercase		:Any											=					padding
              lowercase		:List[str]											=					pool_size
              lowercase		:Optional[Any]											=					hidden_sizes
              lowercase		:int											=					mlp_ratio
              lowercase		:int											=					depths
              lowercase		:Any											=					patch_sizes
              lowercase		:Tuple											=					strides
              lowercase		:Any											=					num_encoder_blocks
              lowercase		:str											=					drop_path_rate
              lowercase		:str											=					hidden_act
              lowercase		:List[str]											=					use_layer_scale
              lowercase		:Union[str, Any]											=					layer_scale_init_value
              lowercase		:Any											=					initializer_range
              super().__init__(**__UpperCamelCase					)







class        __magic_name__		(      a_  ):
       __A      :   List[str]   	= version.parse("1.11"  )






       @property
       def 			__snake_case    ( self	:     Optional[Any]					):

              '''simple docstring'''






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







       @property
       def 			__snake_case    ( self	:     List[str]					):

              '''simple docstring'''






              return 2e-3









# tests directory-specific settings - this file is run automatically
# by pytest before any tests are run

import sys
import warnings
from os.path import abspath, dirname, join


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
lowerCamelCase      :       Dict    =						abspath(join(dirname(dirname(__file__)), '''src'''))
sys.path.insert(1, git_repo_path)

# silence FutureWarning warnings in tests since often we can't act on them until
# they become normal warnings - i.e. the tests still need to test the current functionality
warnings.simplefilter(action='''ignore''', category=FutureWarning)





def    __lowerCAmelCase   (    __snake_case							):
     from diffusers.utils.testing_utils import pytest_addoption_shared

     pytest_addoption_shared(__snake_case							)





def    __lowerCAmelCase   (    __snake_case							):
     from diffusers.utils.testing_utils import pytest_terminal_summary_main

     __lowerCAmelCase             =       terminalreporter.config.getoption("--make-reports"							)
     if make_reports:
          pytest_terminal_summary_main(__snake_case       ,			id=__snake_case							)






