"""simple docstring"""




from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


__lowerCamelCase							 =     logging.get_logger(__name__)

__lowerCamelCase							 =     {
    "microsoft/focalnet-tiny": "https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json",
}
class 			UpperCamelCase__(	lowercase__						,  lowercase__       ):
						lowerCAmelCase__     :  List[Any]  							=						'focalnet'





						def __init__(				self						,__UpperCAmelCase=2_24						,__UpperCAmelCase=4						,__UpperCAmelCase=3						,__UpperCAmelCase=96						,__UpperCAmelCase=False						,__UpperCAmelCase=[1_92, 3_84, 7_68, 7_68]						,__UpperCAmelCase=[2, 2, 6, 2]						,__UpperCAmelCase=[2, 2, 2, 2]						,__UpperCAmelCase=[3, 3, 3, 3]						,__UpperCAmelCase="gelu"						,__UpperCAmelCase=4.0						,__UpperCAmelCase=0.0						,__UpperCAmelCase=0.1						,__UpperCAmelCase=False						,__UpperCAmelCase=1e-4						,__UpperCAmelCase=False						,__UpperCAmelCase=False						,__UpperCAmelCase=False						,__UpperCAmelCase=0.0_2						,__UpperCAmelCase=1e-5						,__UpperCAmelCase=32						,__UpperCAmelCase=None						,__UpperCAmelCase=None						,**__UpperCAmelCase						,)    -> Union[str, Any]:
													super().__init__(**__lowercase   )

													A__		   =							image_size
													A__		   =							patch_size
													A__		   =							num_channels
													A__		   =							embed_dim
													A__		   =							use_conv_embed
													A__		   =							hidden_sizes
													A__		   =							depths
													A__		   =							focal_levels
													A__		   =							focal_windows
													A__		   =							hidden_act
													A__		   =							mlp_ratio
													A__		   =							hidden_dropout_prob
													A__		   =							drop_path_rate
													A__		   =							use_layerscale
													A__		   =							layerscale_value
													A__		   =							use_post_layernorm
													A__		   =							use_post_layernorm_in_modulation
													A__		   =							normalize_modulator
													A__		   =							initializer_range
													A__		   =							layer_norm_eps
													A__		   =							encoder_stride
													A__		   =							["""stem"""] + [f'''stage{idx}''' for idx in range(1						,len(self.depths   ) + 1   )]
													A__		   =							get_aligned_output_features_output_indices(
													    out_features=__lowercase						,out_indices=__lowercase						,stage_names=self.stage_names   )













from math import log

from scipy.constants import Boltzmann, physical_constants

a		:       Any			     = 300  # TEMPERATURE (unit = K)






def 				lowerCamelCase__      (    __lowerCamelCase			:     float  ,		__lowerCamelCase			:     float  ,		__lowerCamelCase			:     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()


