



'''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      __magic_name__						(   a_       ):
							lowerCAmelCase	:   Tuple           = 'efficientnet'







							def __init__(							self :	Union[str, Any]     ,_UpperCAmelCase :	int = 3     ,_UpperCAmelCase :	int = 600     ,_UpperCAmelCase :	float = 2.0     ,_UpperCAmelCase :	float = 3.1     ,_UpperCAmelCase :	int = 8     ,_UpperCAmelCase :	List[int] = [3, 3, 5, 3, 5, 5, 3]     ,_UpperCAmelCase :	List[int] = [32, 16, 24, 40, 80, 112, 192]     ,_UpperCAmelCase :	List[int] = [16, 24, 40, 80, 112, 192, 320]     ,_UpperCAmelCase :	List[int] = []     ,_UpperCAmelCase :	List[int] = [1, 2, 2, 2, 1, 2, 1]     ,_UpperCAmelCase :	List[int] = [1, 2, 2, 3, 3, 4, 1]     ,_UpperCAmelCase :	List[int] = [1, 6, 6, 6, 6, 6, 6]     ,_UpperCAmelCase :	float = 0.25     ,_UpperCAmelCase :	str = "swish"     ,_UpperCAmelCase :	int = 2560     ,_UpperCAmelCase :	str = "mean"     ,_UpperCAmelCase :	float = 0.02     ,_UpperCAmelCase :	float = 0.0_01     ,_UpperCAmelCase :	float = 0.99     ,_UpperCAmelCase :	float = 0.5     ,_UpperCAmelCase :	float = 0.2     ,**_UpperCAmelCase :	str     ,):
									super().__init__(**lowercase_		)

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

class      __magic_name__						(   a_       ):
							lowerCAmelCase	:   List[str]           = version.parse('1.11'       )







							@property
							def 							__lowercase      (							self :	Dict		):
									return OrderedDict(
									    [
									        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
									    ]		)







							@property
							def 							__lowercase      (							self :	Optional[int]		):
									return 1E-5









'''simple docstring'''

from typing import TYPE_CHECKING

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


__lowerCAmelCase						      =       {
    '''configuration_data2vec_audio''': ['''DATA2VEC_AUDIO_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''Data2VecAudioConfig'''],
    '''configuration_data2vec_text''': [
        '''DATA2VEC_TEXT_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''Data2VecTextConfig''',
        '''Data2VecTextOnnxConfig''',
    ],
    '''configuration_data2vec_vision''': [
        '''DATA2VEC_VISION_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''Data2VecVisionConfig''',
        '''Data2VecVisionOnnxConfig''',
    ],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__lowerCAmelCase						      =       [
							    '''DATA2VEC_AUDIO_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''Data2VecAudioForAudioFrameClassification''',
							    '''Data2VecAudioForCTC''',
							    '''Data2VecAudioForSequenceClassification''',
							    '''Data2VecAudioForXVector''',
							    '''Data2VecAudioModel''',
							    '''Data2VecAudioPreTrainedModel''',
							]
							__lowerCAmelCase						      =       [
							    '''DATA2VEC_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''Data2VecTextForCausalLM''',
							    '''Data2VecTextForMaskedLM''',
							    '''Data2VecTextForMultipleChoice''',
							    '''Data2VecTextForQuestionAnswering''',
							    '''Data2VecTextForSequenceClassification''',
							    '''Data2VecTextForTokenClassification''',
							    '''Data2VecTextModel''',
							    '''Data2VecTextPreTrainedModel''',
							]
							__lowerCAmelCase						      =       [
							    '''DATA2VEC_VISION_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''Data2VecVisionForImageClassification''',
							    '''Data2VecVisionForMaskedImageModeling''',
							    '''Data2VecVisionForSemanticSegmentation''',
							    '''Data2VecVisionModel''',
							    '''Data2VecVisionPreTrainedModel''',
							]

if is_tf_available():
							__lowerCAmelCase						      =       [
							    '''TFData2VecVisionForImageClassification''',
							    '''TFData2VecVisionForSemanticSegmentation''',
							    '''TFData2VecVisionModel''',
							    '''TFData2VecVisionPreTrainedModel''',
							]

if TYPE_CHECKING:
							from .configuration_dataavec_audio import DATA2VEC_AUDIO_PRETRAINED_CONFIG_ARCHIVE_MAP, DataaVecAudioConfig
							from .configuration_dataavec_text import (
							    DATA2VEC_TEXT_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    DataaVecTextConfig,
							    DataaVecTextOnnxConfig,
							)
							from .configuration_dataavec_vision import (
							    DATA2VEC_VISION_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    DataaVecVisionConfig,
							    DataaVecVisionOnnxConfig,
							)

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_dataavec_audio import (
														    DATA2VEC_AUDIO_PRETRAINED_MODEL_ARCHIVE_LIST,
														    DataaVecAudioForAudioFrameClassification,
														    DataaVecAudioForCTC,
														    DataaVecAudioForSequenceClassification,
														    DataaVecAudioForXVector,
														    DataaVecAudioModel,
														    DataaVecAudioPreTrainedModel,
														)
														from .modeling_dataavec_text import (
														    DATA2VEC_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST,
														    DataaVecTextForCausalLM,
														    DataaVecTextForMaskedLM,
														    DataaVecTextForMultipleChoice,
														    DataaVecTextForQuestionAnswering,
														    DataaVecTextForSequenceClassification,
														    DataaVecTextForTokenClassification,
														    DataaVecTextModel,
														    DataaVecTextPreTrainedModel,
														)
														from .modeling_dataavec_vision import (
														    DATA2VEC_VISION_PRETRAINED_MODEL_ARCHIVE_LIST,
														    DataaVecVisionForImageClassification,
														    DataaVecVisionForMaskedImageModeling,
														    DataaVecVisionForSemanticSegmentation,
														    DataaVecVisionModel,
														    DataaVecVisionPreTrainedModel,
														)
							if is_tf_available():
														from .modeling_tf_dataavec_vision import (
														    TFDataaVecVisionForImageClassification,
														    TFDataaVecVisionForSemanticSegmentation,
														    TFDataaVecVisionModel,
														    TFDataaVecVisionPreTrainedModel,
														)

else:
							import sys

							__lowerCAmelCase						      =       _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




