

"""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


A_							:			Dict											= logging.get_logger(__name__)

A_							:			Optional[Any]											= {
    "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						(A__			):
			lowerCamelCase__   :		Any							=							'mobilenet_v2'

			def __init__(					self				:						Optional[Any]    ,				__UpperCAmelCase				:						str=3    ,				__UpperCAmelCase				:						str=2_2_4    ,				__UpperCAmelCase				:						Tuple=1.0    ,				__UpperCAmelCase				:						Optional[Any]=8    ,				__UpperCAmelCase				:						Union[str, Any]=8    ,				__UpperCAmelCase				:						str=6    ,				__UpperCAmelCase				:						List[Any]=3_2    ,				__UpperCAmelCase				:						List[str]=True    ,				__UpperCAmelCase				:						str=True    ,				__UpperCAmelCase				:						Union[str, Any]="relu6"    ,				__UpperCAmelCase				:						Optional[Any]=True    ,				__UpperCAmelCase				:						List[Any]=0.8    ,				__UpperCAmelCase				:						Optional[Any]=0.02    ,				__UpperCAmelCase				:						int=0.001    ,				__UpperCAmelCase				:						Any=2_5_5    ,				**__UpperCAmelCase				:						List[Any]    ,				)   ->    List[Any]:
						super().__init__(**__UpperCAmelCase       )

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

						SCREAMING_SNAKE_CASE__								=      num_channels
						SCREAMING_SNAKE_CASE__								=      image_size
						SCREAMING_SNAKE_CASE__								=      depth_multiplier
						SCREAMING_SNAKE_CASE__								=      depth_divisible_by
						SCREAMING_SNAKE_CASE__								=      min_depth
						SCREAMING_SNAKE_CASE__								=      expand_ratio
						SCREAMING_SNAKE_CASE__								=      output_stride
						SCREAMING_SNAKE_CASE__								=      first_layer_is_expansion
						SCREAMING_SNAKE_CASE__								=      finegrained_output
						SCREAMING_SNAKE_CASE__								=      hidden_act
						SCREAMING_SNAKE_CASE__								=      tf_padding
						SCREAMING_SNAKE_CASE__								=      classifier_dropout_prob
						SCREAMING_SNAKE_CASE__								=      initializer_range
						SCREAMING_SNAKE_CASE__								=      layer_norm_eps
						SCREAMING_SNAKE_CASE__								=      semantic_loss_ignore_index





class    lowerCamelCase						(A__			):
			lowerCamelCase__   :		Union[str, Any]							=							version.parse('1.11'			)

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

			@property
			def 					SCREAMING_SNAKE_CASE				(					self				:						List[Any]       )   ->    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 					SCREAMING_SNAKE_CASE				(					self				:						Optional[int]       )   ->    float:
						return 1e-4





"""simple docstring"""




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


A_							:			Union[str, Any]											= logging.get_logger(__name__)

A_							:			int											= {
    "caidas/swin2sr-classicalsr-x2-64": (
        "https://huggingface.co/caidas/swin2sr-classicalsr-x2-64/resolve/main/config.json"
    ),
}





class    lowerCamelCase						(A__			):
			lowerCamelCase__   :		List[str]							=							'swin2sr'

			lowerCamelCase__   :		Optional[Any]							=							{
			    'hidden_size': 'embed_dim',
			    'num_attention_heads': 'num_heads',
			    'num_hidden_layers': 'num_layers',
			}

			def __init__(					self				:						Tuple    ,				__UpperCAmelCase				:						Optional[int]=6_4    ,				__UpperCAmelCase				:						Tuple=1    ,				__UpperCAmelCase				:						Optional[Any]=3    ,				__UpperCAmelCase				:						List[str]=1_8_0    ,				__UpperCAmelCase				:						List[str]=[6, 6, 6, 6, 6, 6]    ,				__UpperCAmelCase				:						Optional[Any]=[6, 6, 6, 6, 6, 6]    ,				__UpperCAmelCase				:						Tuple=8    ,				__UpperCAmelCase				:						Union[str, Any]=2.0    ,				__UpperCAmelCase				:						int=True    ,				__UpperCAmelCase				:						Optional[Any]=0.0    ,				__UpperCAmelCase				:						str=0.0    ,				__UpperCAmelCase				:						Dict=0.1    ,				__UpperCAmelCase				:						Dict="gelu"    ,				__UpperCAmelCase				:						Tuple=False    ,				__UpperCAmelCase				:						List[str]=0.02    ,				__UpperCAmelCase				:						List[Any]=1e-5    ,				__UpperCAmelCase				:						str=2    ,				__UpperCAmelCase				:						Optional[int]=1.0    ,				__UpperCAmelCase				:						Union[str, Any]="1conv"    ,				__UpperCAmelCase				:						List[Any]="pixelshuffle"    ,				**__UpperCAmelCase				:						Any    ,				)   ->    Optional[int]:
						super().__init__(**__UpperCAmelCase       )

						SCREAMING_SNAKE_CASE__								=      image_size
						SCREAMING_SNAKE_CASE__								=      patch_size
						SCREAMING_SNAKE_CASE__								=      num_channels
						SCREAMING_SNAKE_CASE__								=      embed_dim
						SCREAMING_SNAKE_CASE__								=      depths
						SCREAMING_SNAKE_CASE__								=      len(__UpperCAmelCase       )
						SCREAMING_SNAKE_CASE__								=      num_heads
						SCREAMING_SNAKE_CASE__								=      window_size
						SCREAMING_SNAKE_CASE__								=      mlp_ratio
						SCREAMING_SNAKE_CASE__								=      qkv_bias
						SCREAMING_SNAKE_CASE__								=      hidden_dropout_prob
						SCREAMING_SNAKE_CASE__								=      attention_probs_dropout_prob
						SCREAMING_SNAKE_CASE__								=      drop_path_rate
						SCREAMING_SNAKE_CASE__								=      hidden_act
						SCREAMING_SNAKE_CASE__								=      use_absolute_embeddings
						SCREAMING_SNAKE_CASE__								=      layer_norm_eps
						SCREAMING_SNAKE_CASE__								=      initializer_range
						SCREAMING_SNAKE_CASE__								=      upscale
						SCREAMING_SNAKE_CASE__								=      img_range
						SCREAMING_SNAKE_CASE__								=      resi_connection
						SCREAMING_SNAKE_CASE__								=      upsampler


