"""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


__SCREAMING_SNAKE_CASE    	=logging.get_logger(__name__)

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







class        UpperCamelCase		(			lowercase_  ):
   lowercase							=  'efficientnet'
   def __init__(			self     ,__UpperCamelCase = 3     ,__UpperCamelCase = 600     ,__UpperCamelCase = 2.0     ,__UpperCamelCase = 3.1     ,__UpperCamelCase = 8     ,__UpperCamelCase = [3, 3, 5, 3, 5, 5, 3]     ,__UpperCamelCase = [32, 16, 24, 40, 80, 112, 192]     ,__UpperCamelCase = [16, 24, 40, 80, 112, 192, 320]     ,__UpperCamelCase = []     ,__UpperCamelCase = [1, 2, 2, 2, 1, 2, 1]     ,__UpperCamelCase = [1, 2, 2, 3, 3, 4, 1]     ,__UpperCamelCase = [1, 6, 6, 6, 6, 6, 6]     ,__UpperCamelCase = 0.25     ,__UpperCamelCase = "swish"     ,__UpperCamelCase = 2560     ,__UpperCamelCase = "mean"     ,__UpperCamelCase = 0.02     ,__UpperCamelCase = 0.001     ,__UpperCamelCase = 0.99     ,__UpperCamelCase = 0.5     ,__UpperCamelCase = 0.2     ,**__UpperCamelCase     ,)	->      Union[str, Any]:


        '''simple docstring'''


        super().__init__(**__UpperCamelCase			)

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







class        UpperCamelCase		(			lowercase_  ):
   lowercase							=  version.parse('1.11'  )
   @property
   def 			_UpperCAmelCase   (			self			)	->      Mapping[str, Mapping[int, str]]:


        '''simple docstring'''


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







   @property
   def 			_UpperCAmelCase   (			self			)	->      float:


        '''simple docstring'''


        return 1e-5


"""simple docstring"""







import sys

from .dependency_versions_table import deps
from .utils.versions import require_version, require_version_core


# define which module versions we always want to check at run time
# (usually the ones defined in `install_requires` in setup.py)
#
# order specific notes:
# - tqdm must be checked before tokenizers

__SCREAMING_SNAKE_CASE    	="python tqdm regex requests packaging filelock numpy tokenizers".split()
if sys.version_info < (3, 7):
       pkgs_to_check_at_runtime.append("dataclasses")
if sys.version_info < (3, 8):
       pkgs_to_check_at_runtime.append("importlib_metadata")

for pkg in pkgs_to_check_at_runtime:
       if pkg in deps:
              if pkg == "tokenizers":
                     # must be loaded here, or else tqdm check may fail
                     from .utils import is_tokenizers_available

                     if not is_tokenizers_available():
                            continue  # not required, check version only if installed

              require_version_core(deps[pkg])
       else:
              raise ValueError(F"can't find {pkg} in {deps.keys()}, check dependency_versions_table.py")



def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     int     ,			__SCREAMING_SNAKE_CASE							:     Union[str, Any]=None      ):
     require_version(deps[pkg]     ,			__SCREAMING_SNAKE_CASE      )

