

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


__lowerCamelCase						    =      logging.get_logger(__name__)

__lowerCamelCase						    =      {
    '''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    A__ ( _snake_case     ):
    lowercase		   =						"poolformer"



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





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


class    A__ ( _snake_case     ):
    lowercase		   =						version.parse("1.11"     )



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





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







    @property
    def    snake_case_     (   self    )  -> float:





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



'''simple docstring'''







from __future__ import annotations

from typing import Any
def  UpperCAmelCase__      ( UpperCAmelCase__			)     ->     int:
       if not postfix_notation:
              return 0

       A_		   = {"""+""", """-""", """*""", """/"""}
       A_		   = []

       for token in postfix_notation:
              if token in operations:
                     A_   ,     A_		   = stack.pop(), stack.pop()
                     if token == "+":
                            stack.append(a + b			)
                     elif token == "-":
                            stack.append(a - b			)
                     elif token == "*":
                            stack.append(a * b			)
                     else:
                            if a * b < 0 and a % b != 0:
                                   stack.append(a // b + 1			)
                            else:
                                   stack.append(a // b			)
              else:
                     stack.append(int(UpperCAmelCase__			)			)

       return stack.pop()


if __name__ == "__main__":
      import doctest

      doctest.testmod()
