



"""simple docstring"""

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


lowercase__			   =  logging.get_logger(__name__)

lowercase__			   =  {
    "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 SCREAMING_SNAKE_CASE__					(		__snake_case      ):
						_lowerCAmelCase							=					"mobilenet_v2"



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





													'''simple docstring'''

													super().__init__(**_lowercase							)

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

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







class SCREAMING_SNAKE_CASE__					(		__snake_case      ):
						_lowerCAmelCase							=					version.parse("1.11"      )



						@property
						def     lowerCAmelCase__(self							):





													'''simple docstring'''

													return OrderedDict([("""pixel_values""", {0: """batch"""})]							)



						@property
						def     lowerCAmelCase__(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     lowerCAmelCase__(self							):





													'''simple docstring'''

													return 1e-4






"""simple docstring"""

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


lowercase__			   =  logging.get_logger(__name__)

lowercase__			   =  {
    "sayakpaul/vit-msn-base": "https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json",
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}




class SCREAMING_SNAKE_CASE__					(		__snake_case      ):
						_lowerCAmelCase							=					"vit_msn"



						def __init__(self						,     _lowercase=768						,     _lowercase=12						,     _lowercase=12						,     _lowercase=3072						,     _lowercase="gelu"						,     _lowercase=0.0						,     _lowercase=0.0						,     _lowercase=0.02						,     _lowercase=1e-06						,     _lowercase=224						,     _lowercase=16						,     _lowercase=3						,     _lowercase=True						,     **_lowercase						,     ):





													'''simple docstring'''

													super().__init__(**_lowercase							)

													__a		:		int									=       hidden_size
													__a		:		str									=       num_hidden_layers
													__a		:		str									=       num_attention_heads
													__a		:		Optional[Any]									=       intermediate_size
													__a		:		Union[str, Any]									=       hidden_act
													__a		:		Tuple									=       hidden_dropout_prob
													__a		:		Any									=       attention_probs_dropout_prob
													__a		:		List[Any]									=       initializer_range
													__a		:		Any									=       layer_norm_eps
													__a		:		Dict									=       image_size
													__a		:		List[Any]									=       patch_size
													__a		:		Dict									=       num_channels
													__a		:		Optional[Any]									=       qkv_bias

