




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


UpperCAmelCase_		:				List[str]									=     logging.get_logger(__name__)

UpperCAmelCase_		:				Optional[Any]									=     {
    "google/efficientnet-b7": "https://huggingface.co/google/efficientnet-b7/resolve/main/config.json",
}




class 		__A      (			UpperCamelCase__			):
						UpperCamelCase     						=					"""efficientnet"""

						def __init__(		self   :int    , __snake_case   :int = 3    , __snake_case   :int = 6_00    , __snake_case   :float = 2.0    , __snake_case   :float = 3.1    , __snake_case   :int = 8    , __snake_case   :List[int] = [3, 3, 5, 3, 5, 5, 3]    , __snake_case   :List[int] = [32, 16, 24, 40, 80, 1_12, 1_92]    , __snake_case   :List[int] = [16, 24, 40, 80, 1_12, 1_92, 3_20]    , __snake_case   :List[int] = []    , __snake_case   :List[int] = [1, 2, 2, 2, 1, 2, 1]    , __snake_case   :List[int] = [1, 2, 2, 3, 3, 4, 1]    , __snake_case   :List[int] = [1, 6, 6, 6, 6, 6, 6]    , __snake_case   :float = 0.25    , __snake_case   :str = "swish"    , __snake_case   :int = 25_60    , __snake_case   :str = "mean"    , __snake_case   :float = 0.02    , __snake_case   :float = 0.001    , __snake_case   :float = 0.99    , __snake_case   :float = 0.5    , __snake_case   :float = 0.2    , **__snake_case   :List[Any]    , ):
										'''simple docstring'''

										super().__init__(**__snake_case )

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




class 		__A      (			UpperCamelCase__			):
						UpperCamelCase     						=					version.parse("""1.11"""			)

						@property
						def     A__						(		self   :str ):
										'''simple docstring'''

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


						@property
						def     A__						(		self   :Dict ):
										'''simple docstring'''

										return 1E-5










from math import pow, sqrt




def 		lowerCAmelCase_   (	*lowerCamelCase   ):
				__magic_name__	:	Tuple								=len(lowerCamelCase   ) > 0 and all(value > 0.0 for value in values   )
				return result




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(sqrt(molar_mass_a / molar_mass_a   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase   )
				    else ValueError("""Input Error: Molar mass values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(effusion_rate * sqrt(molar_mass_a / molar_mass_a   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(effusion_rate / sqrt(molar_mass_a / molar_mass_a   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(molar_mass / pow(effusion_rate_a / effusion_rate_a	,     2   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(pow(effusion_rate_a / effusion_rate_a	,     2   ) / molar_mass	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




