'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


_A		:      int						   =logging.get_logger(__name__)

_A		:      Dict						   ={
    '''facebook/regnet-y-040''': '''https://huggingface.co/facebook/regnet-y-040/blob/main/config.json''',
}




class _lowerCAmelCase			(	snake_case					):
      UpperCAmelCase_	:						Any	 =       "regnet"
      UpperCAmelCase_	:						Dict	 =       ["x", "y"]







      def __init__(  self  ,    lowercase=3  ,    lowercase=32  ,    lowercase=[128, 192, 512, 1088]  ,    lowercase=[2, 6, 12, 2]  ,    lowercase=64  ,    lowercase="y"  ,    lowercase="relu"  ,    **lowercase  ,    ):
        super().__init__(**lowercase     )
        if layer_type not in self.layer_types:
          raise ValueError(F"""layer_type={layer_type} is not one of {",".join(self.layer_types     )}"""     )
        lowercase				:							Optional[int]									=   num_channels
        lowercase				:							int									=   embedding_size
        lowercase				:							Union[str, Any]									=   hidden_sizes
        lowercase				:							List[Any]									=   depths
        lowercase				:							Optional[int]									=   groups_width
        lowercase				:							int									=   layer_type
        lowercase				:							Union[str, Any]									=   hidden_act
        # always downsample in the first stage
        lowercase				:							Optional[Any]									=   True
'''simple docstring'''
from typing import TYPE_CHECKING

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


_A		:      Optional[Any]						   ={
    '''configuration_mobilevitv2''': [
        '''MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''MobileViTV2Config''',
        '''MobileViTV2OnnxConfig''',
    ],
}


try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _A		:      Union[str, Any]						   =[
     '''MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''MobileViTV2ForImageClassification''',
     '''MobileViTV2ForSemanticSegmentation''',
     '''MobileViTV2Model''',
     '''MobileViTV2PreTrainedModel''',
 ]

if TYPE_CHECKING:
 from .configuration_mobilevitva import (
     MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP,
     MobileViTVaConfig,
     MobileViTVaOnnxConfig,
 )

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_mobilevitva import (
      MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST,
      MobileViTVaForImageClassification,
      MobileViTVaForSemanticSegmentation,
      MobileViTVaModel,
      MobileViTVaPreTrainedModel,
  )

else:
 import sys

 _A		:      Tuple						   =_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)