
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


A     :	Union[str, Any]    = logging.get_logger(__name__)

A     :	List[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 			__A( a			):
				snake_case_						   =    '''poolformer'''




				def __init__(     self		,     _snake_case=3		,     _snake_case=16		,     _snake_case=16		,     _snake_case=3		,     _snake_case=4.0		,     _snake_case=[2, 2, 6, 2]		,     _snake_case=[64, 128, 320, 512]		,     _snake_case=[7, 3, 3, 3]		,     _snake_case=[4, 2, 2, 2]		,     _snake_case=[2, 1, 1, 1]		,     _snake_case=4		,     _snake_case=0.0		,     _snake_case="gelu"		,     _snake_case=True		,     _snake_case=1E-5		,     _snake_case=0.02		,     **_snake_case		,     )    ->      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__(**_snake_case				)







class 			__A( a			):
				snake_case_						   =    version.parse('''1.11'''			)




				@property
				def 				SCREAMING_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 				SCREAMING_SNAKE_CASE_		(     self				)    ->      float:


								'''simple docstring'''




								return 2E-3
'''simple docstring'''





from math import log

from scipy.constants import Boltzmann, physical_constants

SCREAMING_SNAKE_CASE_:     Optional[int]  =3_00  # TEMPERATURE (unit = K)





def 	lowerCAmelCase_				(					snake_case_       : float					,    snake_case_       : float					,    snake_case_       : float					,    )    ->      float:


     '''simple docstring'''




     if donor_conc <= 0:
          raise ValueError("Donor concentration should be positive"			)
     elif acceptor_conc <= 0:
          raise ValueError("Acceptor concentration should be positive"			)
     elif intrinsic_conc <= 0:
          raise ValueError("Intrinsic concentration should be positive"			)
     elif donor_conc <= intrinsic_conc:
          raise ValueError(
              "Donor concentration should be greater than intrinsic concentration"			)
     elif acceptor_conc <= intrinsic_conc:
          raise ValueError(
              "Acceptor concentration should be greater than intrinsic concentration"			)
     else:
          return (
              Boltzmann
              * T
              * log((donor_conc * acceptor_conc) / intrinsic_conc**2			)
              / physical_constants["electron volt"][0]
          )


if __name__ == "__main__":
    import doctest

    doctest.testmod()




