






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


_a    :   Dict        =			logging.get_logger(__name__)

_a    :   int        =			{
    """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 	_UpperCAmelCase  (  _A		):




      """simple docstring"""



      A          =    '''mobilenet_v2'''
      def __init__(   self    ,	_lowerCAmelCase=3    ,	_lowerCAmelCase=224    ,	_lowerCAmelCase=1.0    ,	_lowerCAmelCase=8    ,	_lowerCAmelCase=8    ,	_lowerCAmelCase=6    ,	_lowerCAmelCase=32    ,	_lowerCAmelCase=True    ,	_lowerCAmelCase=True    ,	_lowerCAmelCase="relu6"    ,	_lowerCAmelCase=True    ,	_lowerCAmelCase=0.8    ,	_lowerCAmelCase=0.02    ,	_lowerCAmelCase=0.001    ,	_lowerCAmelCase=255    ,	**_lowerCAmelCase    ,	):



          '''simple docstring'''
          super().__init__(**_lowerCAmelCase		)

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

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







class 	_UpperCAmelCase  (  _A		):




      """simple docstring"""



      A          =    version.parse('''1.11'''		)
      @property
      def 			snake_case_      (   self		):



          '''simple docstring'''
          return OrderedDict([("pixel_values", {0: "batch"})]		)
      @property
      def 			snake_case_      (   self		):



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



      @property
      def 			snake_case_      (   self		):



          '''simple docstring'''
          return 1e-4











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


_a    :   Tuple        =			logging.get_logger(__name__)

_a    :   Optional[int]        =			{
    """facebook/levit-128S""": """https://huggingface.co/facebook/levit-128S/resolve/main/config.json""",
    # See all LeViT models at https://huggingface.co/models?filter=levit
}







class 	_UpperCAmelCase  (  _A		):




      """simple docstring"""



      A          =    '''levit'''
      def __init__(   self    ,	_lowerCAmelCase=224    ,	_lowerCAmelCase=3    ,	_lowerCAmelCase=3    ,	_lowerCAmelCase=2    ,	_lowerCAmelCase=1    ,	_lowerCAmelCase=16    ,	_lowerCAmelCase=[128, 256, 384]    ,	_lowerCAmelCase=[4, 8, 12]    ,	_lowerCAmelCase=[4, 4, 4]    ,	_lowerCAmelCase=[16, 16, 16]    ,	_lowerCAmelCase=0    ,	_lowerCAmelCase=[2, 2, 2]    ,	_lowerCAmelCase=[2, 2, 2]    ,	_lowerCAmelCase=0.02    ,	**_lowerCAmelCase    ,	):



          '''simple docstring'''
          super().__init__(**_lowerCAmelCase		)
          lowerCAmelCase__   :List[str]      							=				image_size
          lowerCAmelCase__   :Dict      							=				num_channels
          lowerCAmelCase__   :List[Any]      							=				kernel_size
          lowerCAmelCase__   :List[Any]      							=				stride
          lowerCAmelCase__   :Tuple      							=				padding
          lowerCAmelCase__   :str      							=				hidden_sizes
          lowerCAmelCase__   :Union[str, Any]      							=				num_attention_heads
          lowerCAmelCase__   :Optional[int]      							=				depths
          lowerCAmelCase__   :Union[str, Any]      							=				key_dim
          lowerCAmelCase__   :str      							=				drop_path_rate
          lowerCAmelCase__   :int      							=				patch_size
          lowerCAmelCase__   :Dict      							=				attention_ratio
          lowerCAmelCase__   :Dict      							=				mlp_ratio
          lowerCAmelCase__   :Optional[int]      							=				initializer_range
          lowerCAmelCase__   :Tuple      							=				[
              ["Subsample", key_dim[0], hidden_sizes[0] // key_dim[0], 4, 2, 2],
              ["Subsample", key_dim[0], hidden_sizes[1] // key_dim[0], 4, 2, 2],
          ]







class 	_UpperCAmelCase  (  _A		):




      """simple docstring"""



      A          =    version.parse('''1.11'''		)
      @property
      def 			snake_case_      (   self		):



          '''simple docstring'''
          return OrderedDict(
              [
                  ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
              ]		)



      @property
      def 			snake_case_      (   self		):



          '''simple docstring'''
          return 1e-4



