



from ....utils import logging


snake_case__					:     List[Any]    		=   logging.get_logger(__name__)

class   _A   ( _lowercase	):


						'''simple docstring'''





						def __init__(	self	:							List[str]							,      lowerCamelCase	:							Any							,      lowerCamelCase	:							Dict=None							,      lowerCamelCase	:							Dict=2_048	):






							'''simple docstring'''



							__lowercase		       =			config.__dict__
							__lowercase		       =			modal_hidden_size
							if num_labels:
								__lowercase		       =			num_labels








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


snake_case__					:     List[Any]    		=   logging.get_logger(__name__)

snake_case__					:     List[str]    		=   {
    """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   _A   ( _lowercase	):


						'''simple docstring'''





						_snake_case			:     List[Any]      							=      """yolos"""



						def __init__(	self	:							Union[str, Any]							,      lowerCamelCase	:							Union[str, Any]=768							,      lowerCamelCase	:							int=12							,      lowerCamelCase	:							Union[str, Any]=12							,      lowerCamelCase	:							Optional[Any]=3_072							,      lowerCamelCase	:							Optional[int]="gelu"							,      lowerCamelCase	:							Dict=0.0							,      lowerCamelCase	:							Optional[Any]=0.0							,      lowerCamelCase	:							Any=0.02							,      lowerCamelCase	:							Optional[Any]=1e-12							,      lowerCamelCase	:							Optional[Any]=[512, 864]							,      lowerCamelCase	:							str=16							,      lowerCamelCase	:							Dict=3							,      lowerCamelCase	:							str=True							,      lowerCamelCase	:							List[Any]=100							,      lowerCamelCase	:							Dict=True							,      lowerCamelCase	:							Dict=False							,      lowerCamelCase	:							List[str]=1							,      lowerCamelCase	:							str=5							,      lowerCamelCase	:							Any=2							,      lowerCamelCase	:							str=5							,      lowerCamelCase	:							Optional[int]=2							,      lowerCamelCase	:							List[Any]=0.1							,      **lowerCamelCase	:							List[Any]							,      ):






							'''simple docstring'''



							super().__init__(**lowerCamelCase	)

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

class   _A   ( _lowercase	):


						'''simple docstring'''





						_snake_case			:     Dict      							=      version.parse("""1.11"""	)



						@property
						def     _snake_case	(	self	:							Union[str, Any]	):






							'''simple docstring'''



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



						@property
						def     _snake_case	(	self	:							str	):






							'''simple docstring'''



							return 1e-4



						@property
						def     _snake_case	(	self	:							Tuple	):






							'''simple docstring'''



							return 12



