



'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


SCREAMING_SNAKE_CASE__     :						List[str]	=  {
    '''configuration_groupvit''': [
        '''GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''GroupViTConfig''',
        '''GroupViTOnnxConfig''',
        '''GroupViTTextConfig''',
        '''GroupViTVisionConfig''',
    ],
}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			SCREAMING_SNAKE_CASE__     :						Any	=  [
			    '''GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''GroupViTModel''',
			    '''GroupViTPreTrainedModel''',
			    '''GroupViTTextModel''',
			    '''GroupViTVisionModel''',
			]

try:
			if not is_tf_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			SCREAMING_SNAKE_CASE__     :						str	=  [
			    '''TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST''',
			    '''TFGroupViTModel''',
			    '''TFGroupViTPreTrainedModel''',
			    '''TFGroupViTTextModel''',
			    '''TFGroupViTVisionModel''',
			]

if TYPE_CHECKING:
			from .configuration_groupvit import (
			    GROUPVIT_PRETRAINED_CONFIG_ARCHIVE_MAP,
			    GroupViTConfig,
			    GroupViTOnnxConfig,
			    GroupViTTextConfig,
			    GroupViTVisionConfig,
			)

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_groupvit import (
						    GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
						    GroupViTModel,
						    GroupViTPreTrainedModel,
						    GroupViTTextModel,
						    GroupViTVisionModel,
						)

			try:
						if not is_tf_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_groupvit import (
						    TF_GROUPVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
						    TFGroupViTModel,
						    TFGroupViTPreTrainedModel,
						    TFGroupViTTextModel,
						    TFGroupViTVisionModel,
						)

else:
			import sys

			SCREAMING_SNAKE_CASE__     :						List[str]	=  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)









'''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__     :						Union[str, Any]	=  logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__     :						Union[str, Any]	=  {
    '''google/efficientnet-b7''': '''https://huggingface.co/google/efficientnet-b7/resolve/main/config.json''',
}

class 							a__( snake_case__     ):
			a_	: int									=      '''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					,   )							->							Dict:
					super().__init__(**_UpperCAmelCase						)

					snake_case__	     =num_channels
					snake_case__	     =image_size
					snake_case__	     =width_coefficient
					snake_case__	     =depth_coefficient
					snake_case__	     =depth_divisor
					snake_case__	     =kernel_sizes
					snake_case__	     =in_channels
					snake_case__	     =out_channels
					snake_case__	     =depthwise_padding
					snake_case__	     =strides
					snake_case__	     =num_block_repeats
					snake_case__	     =expand_ratios
					snake_case__	     =squeeze_expansion_ratio
					snake_case__	     =hidden_act
					snake_case__	     =hidden_dim
					snake_case__	     =pooling_type
					snake_case__	     =initializer_range
					snake_case__	     =batch_norm_eps
					snake_case__	     =batch_norm_momentum
					snake_case__	     =dropout_rate
					snake_case__	     =drop_connect_rate
					snake_case__	     =sum(_UpperCAmelCase						) * 4





class 							a__( snake_case__     ):
			a_	: List[str]									=      version.parse('''1.11'''     )






			@property
			def 						_lowercase  (     self						)							->							Mapping[str, Mapping[int, str]]:
					return OrderedDict(
					    [
					        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
					    ]						)






			@property
			def 						_lowercase  (     self						)							->							float:
					return 1E-5




