
'''simple docstring'''



from typing import List

from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowercase          =						logging.get_logger(__name__)

_lowercase          =						{
    """snap-research/efficientformer-l1-300""": (
        """https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json"""
    ),
}




class     UpperCAmelCase_	(						_SCREAMING_SNAKE_CASE					):






						'''simple docstring'''






						_lowercase						: Tuple										=  '''efficientformer'''




						def __init__(   self       ,  _lowercase = [3, 2, 6, 4]       ,  _lowercase = [48, 96, 224, 448]       ,  _lowercase = [True, True, True, True]       ,  _lowercase = 448       ,  _lowercase = 32       ,  _lowercase = 4       ,  _lowercase = 7       ,  _lowercase = 5       ,  _lowercase = 8       ,  _lowercase = 4       ,  _lowercase = 0.0       ,  _lowercase = 16       ,  _lowercase = 3       ,  _lowercase = 3       ,  _lowercase = 3       ,  _lowercase = 2       ,  _lowercase = 1       ,  _lowercase = 0.0       ,  _lowercase = 1       ,  _lowercase = True       ,  _lowercase = True       ,  _lowercase = 1e-5       ,  _lowercase = "gelu"       ,  _lowercase = 0.02       ,  _lowercase = 1e-12       ,  _lowercase = 224       ,  _lowercase = 1e-05       ,  **_lowercase       ,  ):

												"""simple docstring"""



												super().__init__(**_lowercase )

												_lowerCAmelCase    		=					hidden_act
												_lowerCAmelCase    		=					hidden_dropout_prob
												_lowerCAmelCase    		=					hidden_sizes
												_lowerCAmelCase    		=					num_hidden_layers
												_lowerCAmelCase    		=					num_attention_heads
												_lowerCAmelCase    		=					initializer_range
												_lowerCAmelCase    		=					layer_norm_eps
												_lowerCAmelCase    		=					patch_size
												_lowerCAmelCase    		=					num_channels
												_lowerCAmelCase    		=					depths
												_lowerCAmelCase    		=					mlp_expansion_ratio
												_lowerCAmelCase    		=					downsamples
												_lowerCAmelCase    		=					dim
												_lowerCAmelCase    		=					key_dim
												_lowerCAmelCase    		=					attention_ratio
												_lowerCAmelCase    		=					resolution
												_lowerCAmelCase    		=					pool_size
												_lowerCAmelCase    		=					downsample_patch_size
												_lowerCAmelCase    		=					downsample_stride
												_lowerCAmelCase    		=					downsample_pad
												_lowerCAmelCase    		=					drop_path_rate
												_lowerCAmelCase    		=					num_metaad_blocks
												_lowerCAmelCase    		=					distillation
												_lowerCAmelCase    		=					use_layer_scale
												_lowerCAmelCase    		=					layer_scale_init_value
												_lowerCAmelCase    		=					image_size
												_lowerCAmelCase    		=					batch_norm_eps






'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


lowerCAmelCase_      :  Optional[Any]				     =  {
    'configuration_mobilevit': ['MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MobileViTConfig', 'MobileViTOnnxConfig'],
}

try:
 if not is_vision_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_      :  int				     =  ['MobileViTFeatureExtractor']
 lowerCAmelCase_      :  int				     =  ['MobileViTImageProcessor']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_      :  str				     =  [
     'MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'MobileViTForImageClassification',
     'MobileViTForSemanticSegmentation',
     'MobileViTModel',
     'MobileViTPreTrainedModel',
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase_      :  Optional[Any]				     =  [
     'TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFMobileViTForImageClassification',
     'TFMobileViTForSemanticSegmentation',
     'TFMobileViTModel',
     'TFMobileViTPreTrainedModel',
 ]

if TYPE_CHECKING:
 from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

 try:
  if not is_vision_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .feature_extraction_mobilevit import MobileViTFeatureExtractor
  from .image_processing_mobilevit import MobileViTImageProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_mobilevit import (
      MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
      MobileViTForImageClassification,
      MobileViTForSemanticSegmentation,
      MobileViTModel,
      MobileViTPreTrainedModel,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_mobilevit import (
      TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFMobileViTForImageClassification,
      TFMobileViTForSemanticSegmentation,
      TFMobileViTModel,
      TFMobileViTPreTrainedModel,
  )


else:
 import sys

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