

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__						=							logging.get_logger(__name__)

A__						=							{
    "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			):
	_lowercase  :   Any       				=  "yolos"







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

						'''simple docstring'''





						super().__init__(**__UpperCamelCase      )

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




class 				__UpperCamelCase				(					SCREAMING_SNAKE_CASE			):
	_lowercase  :   str       				=  version.parse("1.11"			)







	@property
	def 	_SCREAMING_SNAKE_CASE							(   self: Dict      ):

						'''simple docstring'''





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







	@property
	def 	_SCREAMING_SNAKE_CASE							(   self: Dict      ):

						'''simple docstring'''





						return 1E-4







	@property
	def 	_SCREAMING_SNAKE_CASE							(   self: Optional[int]      ):

						'''simple docstring'''





						return 12







from __future__ import annotations




def 					_lowercase     (				a_				:					int				)				->	bool:




					'''simple docstring'''







					__magic_name__							=    str(a_				)
					return len(a_				) == 9 and set(a_				) == set('123456789'				)




def 					_lowercase     (				)				->	int | None:




					'''simple docstring'''







					for base_num in range(9_9_9_9					,4_9_9_9					,-1				):
										__magic_name__							=    1_0_0_0_0_2 * base_num
										if is_9_pandigital(a_				):
															return candidate

					for base_num in range(3_3_3					,9_9					,-1				):
										__magic_name__							=    1_0_0_2_0_0_3 * base_num
										if is_9_pandigital(a_				):
															return candidate

					return None


if __name__ == "__main__":
						print(f'''{solution() = }''')




