





"""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		:				Union[str, Any]  			=    logging.get_logger(__name__)

a		:				Optional[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       (		a__		):
							lowerCamelCase     :      int         ="""yolos"""






							def __init__(     self   ,      lowerCAmelCase__=768   ,      lowerCAmelCase__=12   ,      lowerCAmelCase__=12   ,      lowerCAmelCase__=3072   ,      lowerCAmelCase__="gelu"   ,      lowerCAmelCase__=0.0   ,      lowerCAmelCase__=0.0   ,      lowerCAmelCase__=0.02   ,      lowerCAmelCase__=1E-12   ,      lowerCAmelCase__=[512, 864]   ,      lowerCAmelCase__=16   ,      lowerCAmelCase__=3   ,      lowerCAmelCase__=True   ,      lowerCAmelCase__=100   ,      lowerCAmelCase__=True   ,      lowerCAmelCase__=False   ,      lowerCAmelCase__=1   ,      lowerCAmelCase__=5   ,      lowerCAmelCase__=2   ,      lowerCAmelCase__=5   ,      lowerCAmelCase__=2   ,      lowerCAmelCase__=0.1   ,      **lowerCAmelCase__   ,      )			->				Union[str, Any]:
								super().__init__(**lowerCAmelCase__   )

								a   :	List[Any]			=       hidden_size
								a   :	Optional[Any]			=       num_hidden_layers
								a   :	List[Any]			=       num_attention_heads
								a   :	int			=       intermediate_size
								a   :	int			=       hidden_act
								a   :	int			=       hidden_dropout_prob
								a   :	Optional[int]			=       attention_probs_dropout_prob
								a   :	Tuple			=       initializer_range
								a   :	Optional[Any]			=       layer_norm_eps
								a   :	Any			=       image_size
								a   :	Optional[int]			=       patch_size
								a   :	str			=       num_channels
								a   :	Dict			=       qkv_bias
								a   :	Union[str, Any]			=       num_detection_tokens
								a   :	Optional[Any]			=       use_mid_position_embeddings
								a   :	List[Any]			=       auxiliary_loss
								# Hungarian matcher
								a   :	int			=       class_cost
								a   :	str			=       bbox_cost
								a   :	List[Any]			=       giou_cost
								# Loss coefficients
								a   :	List[str]			=       bbox_loss_coefficient
								a   :	Any			=       giou_loss_coefficient
								a   :	Optional[Any]			=       eos_coefficient


class  __UpperCamelCase       (		a__		):
							lowerCamelCase     :      Tuple         =version.parse("""1.11"""		)






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






							@property
							def 					__a     (     self   )			->				float:
								return 1E-4






							@property
							def 					__a     (     self   )			->				int:
								return 12









"""simple docstring"""




from ..utils import DummyObject, requires_backends


class  __UpperCamelCase       (		metaclass=a__		):
							lowerCamelCase     :      Optional[Any]         =["""transformers""", """torch""", """note_seq"""]






							def __init__(     self   ,      *lowerCAmelCase__   ,      **lowerCAmelCase__   )			->				Union[str, Any]:
								requires_backends(self   ,      ["transformers", "torch", "note_seq"]   )






							@classmethod
							def 					__a     (     cls   ,      *lowerCAmelCase__   ,      **lowerCAmelCase__   )			->				Any:
								requires_backends(cls   ,      ["transformers", "torch", "note_seq"]   )






							@classmethod
							def 					__a     (     cls   ,      *lowerCAmelCase__   ,      **lowerCAmelCase__   )			->				int:
								requires_backends(cls   ,      ["transformers", "torch", "note_seq"]   )


