






from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__UpperCAmelCase								=						logging.get_logger(__name__)

__UpperCAmelCase								=						{
    'google/mobilenet_v2_1.4_224': 'https://huggingface.co/google/mobilenet_v2_1.4_224/resolve/main/config.json',
    'google/mobilenet_v2_1.0_224': 'https://huggingface.co/google/mobilenet_v2_1.0_224/resolve/main/config.json',
    'google/mobilenet_v2_0.75_160': 'https://huggingface.co/google/mobilenet_v2_0.75_160/resolve/main/config.json',
    'google/mobilenet_v2_0.35_96': 'https://huggingface.co/google/mobilenet_v2_0.35_96/resolve/main/config.json',
    # See all MobileNetV2 models at https://huggingface.co/models?filter=mobilenet_v2
}



class   lowerCamelCase      (snake_case_			):







		'''simple docstring'''



		_snake_case    :    str       						=  '''mobilenet_v2'''



		def __init__(							self				,		_UpperCamelCase=3				,		_UpperCamelCase=2_2_4				,		_UpperCamelCase=1.0				,		_UpperCamelCase=8				,		_UpperCamelCase=8				,		_UpperCamelCase=6				,		_UpperCamelCase=3_2				,		_UpperCamelCase=True				,		_UpperCamelCase=True				,		_UpperCamelCase="relu6"				,		_UpperCamelCase=True				,		_UpperCamelCase=0.8				,		_UpperCamelCase=0.02				,		_UpperCamelCase=0.0_01				,		_UpperCamelCase=2_5_5				,		**_UpperCamelCase				,		)	->							Dict:
							super().__init__(**_UpperCamelCase   )

							if depth_multiplier <= 0:
												raise ValueError('depth_multiplier must be greater than zero.'   )

							UpperCAmelCase_    :      List[str]            =						num_channels
							UpperCAmelCase_    :      Union[str, Any]            =						image_size
							UpperCAmelCase_    :      List[Any]            =						depth_multiplier
							UpperCAmelCase_    :      Optional[int]            =						depth_divisible_by
							UpperCAmelCase_    :      Dict            =						min_depth
							UpperCAmelCase_    :      str            =						expand_ratio
							UpperCAmelCase_    :      Any            =						output_stride
							UpperCAmelCase_    :      List[str]            =						first_layer_is_expansion
							UpperCAmelCase_    :      List[str]            =						finegrained_output
							UpperCAmelCase_    :      List[str]            =						hidden_act
							UpperCAmelCase_    :      int            =						tf_padding
							UpperCAmelCase_    :      int            =						classifier_dropout_prob
							UpperCAmelCase_    :      List[str]            =						initializer_range
							UpperCAmelCase_    :      Any            =						layer_norm_eps
							UpperCAmelCase_    :      List[Any]            =						semantic_loss_ignore_index





class   lowerCamelCase      (snake_case_			):







		'''simple docstring'''



		_snake_case    :    List[Any]       						=  version.parse('''1.11'''			)



		@property
		def 					__UpperCAmelCase			(							self   )	->							Mapping[str, Mapping[int, str]]:
							return OrderedDict([('pixel_values', {0: 'batch'})]   )



		@property
		def 					__UpperCAmelCase			(							self   )	->							Mapping[str, Mapping[int, str]]:





							if self.task == "image-classification":
												return OrderedDict([('logits', {0: 'batch'})]   )
							else:
												return OrderedDict([('last_hidden_state', {0: 'batch'}), ('pooler_output', {0: 'batch'})]   )



		@property
		def 					__UpperCAmelCase			(							self   )	->							float:
							return 1E-4







from typing import TYPE_CHECKING

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


a_    					=       {'configuration_encoder_decoder': ['EncoderDecoderConfig']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a_    					=       ['EncoderDecoderModel']

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a_    					=       ['TFEncoderDecoderModel']

try:
   if not is_flax_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   a_    					=       ['FlaxEncoderDecoderModel']

if TYPE_CHECKING:
   from .configuration_encoder_decoder import EncoderDecoderConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_encoder_decoder import EncoderDecoderModel

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_encoder_decoder import TFEncoderDecoderModel

   try:
      if not is_flax_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_flax_encoder_decoder import FlaxEncoderDecoderModel

else:
   import sys

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



