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   __lowercase				(  __UpperCAmelCase  ):
      UpperCamelCase								=       '''yolos'''





      def __init__(		self						:					Optional[int]					,       __lowerCamelCase						:					Dict=7_6_8					,       __lowerCamelCase						:					Tuple=1_2					,       __lowerCamelCase						:					List[Any]=1_2					,       __lowerCamelCase						:					int=3_0_7_2					,       __lowerCamelCase						:					Union[str, Any]="gelu"					,       __lowerCamelCase						:					Union[str, Any]=0.0					,       __lowerCamelCase						:					Union[str, Any]=0.0					,       __lowerCamelCase						:					Union[str, Any]=0.02					,       __lowerCamelCase						:					List[Any]=1e-1_2					,       __lowerCamelCase						:					Dict=[5_1_2, 8_6_4]					,       __lowerCamelCase						:					Union[str, Any]=1_6					,       __lowerCamelCase						:					Dict=3					,       __lowerCamelCase						:					Union[str, Any]=True					,       __lowerCamelCase						:					str=1_0_0					,       __lowerCamelCase						:					Union[str, Any]=True					,       __lowerCamelCase						:					Any=False					,       __lowerCamelCase						:					Any=1					,       __lowerCamelCase						:					int=5					,       __lowerCamelCase						:					Tuple=2					,       __lowerCamelCase						:					Optional[int]=5					,       __lowerCamelCase						:					int=2					,       __lowerCamelCase						:					Tuple=0.1					,       **__lowerCamelCase						:					List[Any]					,       )    ->   Union[str, Any]:






         """simple docstring"""







         super().__init__(**lowerCAmelCase_       )

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






class   __lowercase				(  __UpperCAmelCase  ):
      UpperCamelCase								=       version.parse('''1.11'''  )





      @property
      def        _lowercase				(		self						:					Tuple       )    ->   List[Any]:






         """simple docstring"""







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





      @property
      def        _lowercase				(		self						:					Optional[Any]       )    ->   Tuple:






         """simple docstring"""







         return 1e-4





      @property
      def        _lowercase				(		self						:					Optional[int]       )    ->   Optional[Any]:






         """simple docstring"""







         return 1_2







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available


__a     =			{"""tokenization_herbert""": ["""HerbertTokenizer"""]}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __a     =			["""HerbertTokenizerFast"""]


if TYPE_CHECKING:
 from .tokenization_herbert import HerbertTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_herbert_fast import HerbertTokenizerFast

else:
 import sys

 __a     =			_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



