"""simple docstring"""





from collections import OrderedDict
from typing import List, Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowerCAmelCase_     =	logging.get_logger(__name__)

lowerCAmelCase_     =	{
    '''google/efficientnet-b7''': '''https://huggingface.co/google/efficientnet-b7/resolve/main/config.json''',
}




class  _snake_case		(    __snake_case ):







				"""simple docstring"""






				a			=						"efficientnet"





				def __init__(      self							:							int      ,    _A							:							int = 3      ,    _A							:							int = 6_0_0      ,    _A							:							float = 2.0      ,    _A							:							float = 3.1      ,    _A							:							int = 8      ,    _A							:							List[int] = [3, 3, 5, 3, 5, 5, 3]      ,    _A							:							List[int] = [3_2, 1_6, 2_4, 4_0, 8_0, 1_1_2, 1_9_2]      ,    _A							:							List[int] = [1_6, 2_4, 4_0, 8_0, 1_1_2, 1_9_2, 3_2_0]      ,    _A							:							List[int] = []      ,    _A							:							List[int] = [1, 2, 2, 2, 1, 2, 1]      ,    _A							:							List[int] = [1, 2, 2, 3, 3, 4, 1]      ,    _A							:							List[int] = [1, 6, 6, 6, 6, 6, 6]      ,    _A							:							float = 0.25      ,    _A							:							str = "swish"      ,    _A							:							int = 2_5_6_0      ,    _A							:							str = "mean"      ,    _A							:							float = 0.02      ,    _A							:							float = 0.001      ,    _A							:							float = 0.99      ,    _A							:							float = 0.5      ,    _A							:							float = 0.2      ,    **_A							:							List[str]      ,    ):



											"""simple docstring"""







											super().__init__(**_A)

											_SCREAMING_SNAKE_CASE		:						List[str]			  =    num_channels
											_SCREAMING_SNAKE_CASE		:						Union[str, Any]			  =    image_size
											_SCREAMING_SNAKE_CASE		:						Optional[Any]			  =    width_coefficient
											_SCREAMING_SNAKE_CASE		:						Tuple			  =    depth_coefficient
											_SCREAMING_SNAKE_CASE		:						Dict			  =    depth_divisor
											_SCREAMING_SNAKE_CASE		:						Optional[Any]			  =    kernel_sizes
											_SCREAMING_SNAKE_CASE		:						Dict			  =    in_channels
											_SCREAMING_SNAKE_CASE		:						Any			  =    out_channels
											_SCREAMING_SNAKE_CASE		:						Dict			  =    depthwise_padding
											_SCREAMING_SNAKE_CASE		:						str			  =    strides
											_SCREAMING_SNAKE_CASE		:						Dict			  =    num_block_repeats
											_SCREAMING_SNAKE_CASE		:						Tuple			  =    expand_ratios
											_SCREAMING_SNAKE_CASE		:						int			  =    squeeze_expansion_ratio
											_SCREAMING_SNAKE_CASE		:						int			  =    hidden_act
											_SCREAMING_SNAKE_CASE		:						int			  =    hidden_dim
											_SCREAMING_SNAKE_CASE		:						Union[str, Any]			  =    pooling_type
											_SCREAMING_SNAKE_CASE		:						int			  =    initializer_range
											_SCREAMING_SNAKE_CASE		:						List[str]			  =    batch_norm_eps
											_SCREAMING_SNAKE_CASE		:						Tuple			  =    batch_norm_momentum
											_SCREAMING_SNAKE_CASE		:						List[str]			  =    dropout_rate
											_SCREAMING_SNAKE_CASE		:						Optional[Any]			  =    drop_connect_rate
											_SCREAMING_SNAKE_CASE		:						int			  =    sum(_A) * 4




class  _snake_case		(    __snake_case ):







				"""simple docstring"""






				a			=						version.parse("1.11" )





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



											"""simple docstring"""







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





				@property
				def 		_lowerCAmelCase		(      self							:							str):



											"""simple docstring"""







											return 1e-5



"""simple docstring"""





from __future__ import annotations



def      lowerCamelCase_(__SCREAMING_SNAKE_CASE     ,	__SCREAMING_SNAKE_CASE     ,	__SCREAMING_SNAKE_CASE     ,	)->    tuple:
							if (electron_conc, hole_conc, intrinsic_conc).count(0  ) != 1:
														raise ValueError("""You cannot supply more or less than 2 values"""  )
							elif electron_conc < 0:
														raise ValueError("""Electron concentration cannot be negative in a semiconductor"""  )
							elif hole_conc < 0:
														raise ValueError("""Hole concentration cannot be negative in a semiconductor"""  )
							elif intrinsic_conc < 0:
														raise ValueError(
														    """Intrinsic concentration cannot be negative in a semiconductor"""  )
							elif electron_conc == 0:
														return (
														    "electron_conc",
														    intrinsic_conc**2 / hole_conc,
														)
							elif hole_conc == 0:
														return (
														    "hole_conc",
														    intrinsic_conc**2 / electron_conc,
														)
							elif intrinsic_conc == 0:
														return (
														    "intrinsic_conc",
														    (electron_conc * hole_conc) ** 0.5,
														)
							else:
														return (-1, -1)


if __name__ == "__main__":
			import doctest

			doctest.testmod()


