





"""simple docstring"""






from ....configuration_utils import PretrainedConfig
from ....utils import logging


A 			=  logging.get_logger(__name__)

A 			=  {
    '''Visual-Attention-Network/van-base''': (
        '''https://huggingface.co/Visual-Attention-Network/van-base/blob/main/config.json'''
    ),
}




class 				__lowercase			(			_UpperCamelCase							):







					'''simple docstring'''




					__lowerCAmelCase  =  '''van'''







					def __init__(						self	,			_UpperCAmelCase=224	,			_UpperCAmelCase=3	,			_UpperCAmelCase=[7, 3, 3, 3]	,			_UpperCAmelCase=[4, 2, 2, 2]	,			_UpperCAmelCase=[64, 128, 320, 512]	,			_UpperCAmelCase=[3, 3, 12, 3]	,			_UpperCAmelCase=[8, 8, 4, 4]	,			_UpperCAmelCase="gelu"	,			_UpperCAmelCase=0.0_2	,			_UpperCAmelCase=1e-6	,			_UpperCAmelCase=1e-2	,			_UpperCAmelCase=0.0	,			_UpperCAmelCase=0.0	,			**_UpperCAmelCase	,			):
									super().__init__(**_UpperCAmelCase     )
									__a :						Tuple			       =  image_size
									__a :						Optional[int]			       =  num_channels
									__a :						int			       =  patch_sizes
									__a :						int			       =  strides
									__a :						Tuple			       =  hidden_sizes
									__a :						Optional[int]			       =  depths
									__a :						int			       =  mlp_ratios
									__a :						Optional[int]			       =  hidden_act
									__a :						Optional[int]			       =  initializer_range
									__a :						Optional[int]			       =  layer_norm_eps
									__a :						Any			       =  layer_scale_init_value
									__a :						Dict			       =  drop_path_rate
									__a :						Tuple			       =  dropout_rate






"""simple docstring"""






from math import log

from scipy.constants import Boltzmann, physical_constants

A 			=  300  # TEMPERATURE (unit = K)

def     __A      (			a_						:float   ,       a_						:float   ,       a_						:float   ,       )		->		float:

				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()