



'''simple docstring'''

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


__lowerCAmelCase									=   logging.get_logger(__name__)

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

class 	__magic_name__						(    _UpperCamelCase   ):
							lowerCAmelCase       :    List[str]   				=					'swin2sr'

							lowerCAmelCase       :    str   				=					{
							    'hidden_size': 'embed_dim',
							    'num_attention_heads': 'num_heads',
							    'num_hidden_layers': 'num_layers',
							}







							def __init__(							self					:       Union[str, Any]	,_UpperCAmelCase					:       Tuple=64	,_UpperCAmelCase					:       str=1	,_UpperCAmelCase					:       List[Any]=3	,_UpperCAmelCase					:       Any=180	,_UpperCAmelCase					:       Optional[Any]=[6, 6, 6, 6, 6, 6]	,_UpperCAmelCase					:       Any=[6, 6, 6, 6, 6, 6]	,_UpperCAmelCase					:       int=8	,_UpperCAmelCase					:       Any=2.0	,_UpperCAmelCase					:       Optional[Any]=True	,_UpperCAmelCase					:       Tuple=0.0	,_UpperCAmelCase					:       Optional[int]=0.0	,_UpperCAmelCase					:       Tuple=0.1	,_UpperCAmelCase					:       List[str]="gelu"	,_UpperCAmelCase					:       Tuple=False	,_UpperCAmelCase					:       Optional[int]=0.02	,_UpperCAmelCase					:       Union[str, Any]=1E-5	,_UpperCAmelCase					:       int=2	,_UpperCAmelCase					:       Tuple=1.0	,_UpperCAmelCase					:       Union[str, Any]="1conv"	,_UpperCAmelCase					:       Tuple="pixelshuffle"	,**_UpperCAmelCase					:       List[str]	,):
									super().__init__(**_UpperCAmelCase		)

									_a     :      List[str]        =							image_size
									_a     :      Dict        =							patch_size
									_a     :      Optional[int]        =							num_channels
									_a     :      Optional[int]        =							embed_dim
									_a     :      Union[str, Any]        =							depths
									_a     :      Optional[int]        =							len(_UpperCAmelCase		)
									_a     :      Optional[Any]        =							num_heads
									_a     :      str        =							window_size
									_a     :      Optional[Any]        =							mlp_ratio
									_a     :      Optional[int]        =							qkv_bias
									_a     :      Tuple        =							hidden_dropout_prob
									_a     :      List[Any]        =							attention_probs_dropout_prob
									_a     :      Any        =							drop_path_rate
									_a     :      str        =							hidden_act
									_a     :      Tuple        =							use_absolute_embeddings
									_a     :      Dict        =							layer_norm_eps
									_a     :      Any        =							initializer_range
									_a     :      Optional[Any]        =							upscale
									_a     :      int        =							img_range
									_a     :      Union[str, Any]        =							resi_connection
									_a     :      int        =							upsampler






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


SCREAMING_SNAKE_CASE							:Optional[Any]							 =				logging.get_logger(__name__)

SCREAMING_SNAKE_CASE							:List[Any]							 =				{
    'hustvl/yolos-small': 'https://huggingface.co/hustvl/yolos-small/resolve/main/config.json',
    # See all YOLOS models at https://huggingface.co/models?filter=yolos
}





class 							UpperCAmelCase      (  __SCREAMING_SNAKE_CASE  ):




	'''simple docstring'''





	snake_case_					    =     "yolos"






	def __init__(       self					: Any							,A					: Optional[Any]=7_68							,A					: Dict=12							,A					: Any=12							,A					: str=30_72							,A					: Any="gelu"							,A					: str=0.0							,A					: List[str]=0.0							,A					: Dict=0.02							,A					: int=1E-12							,A					: Tuple=[5_12, 8_64]							,A					: List[Any]=16							,A					: str=3							,A					: str=True							,A					: Any=1_00							,A					: Dict=True							,A					: Dict=False							,A					: Tuple=1							,A					: Union[str, Any]=5							,A					: Optional[Any]=2							,A					: Union[str, Any]=5							,A					: int=2							,A					: int=0.1							,**A					: List[str]							,):
					super().__init__(**A )

					__A   			= hidden_size
					__A   			= num_hidden_layers
					__A   			= num_attention_heads
					__A   			= intermediate_size
					__A   			= hidden_act
					__A   			= hidden_dropout_prob
					__A   			= attention_probs_dropout_prob
					__A   			= initializer_range
					__A   			= layer_norm_eps
					__A   			= image_size
					__A   			= patch_size
					__A   			= num_channels
					__A   			= qkv_bias
					__A   			= num_detection_tokens
					__A   			= use_mid_position_embeddings
					__A   			= auxiliary_loss
					# Hungarian matcher
					__A   			= class_cost
					__A   			= bbox_cost
					__A   			= giou_cost
					# Loss coefficients
					__A   			= bbox_loss_coefficient
					__A   			= giou_loss_coefficient
					__A   			= eos_coefficient





class 							UpperCAmelCase      (  __SCREAMING_SNAKE_CASE  ):




	'''simple docstring'''





	snake_case_					    =     version.parse("1.11"  )






	@property
	def 				UpperCamelCase_  (       self					: str ):
					return OrderedDict(
					    [
					        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
					    ] )






	@property
	def 				UpperCamelCase_  (       self					: List[Any] ):
					return 1E-4







	@property
	def 				UpperCamelCase_  (       self					: Optional[Any] ):
					return 12
