

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


__UpperCAmelCase    				=     logging.get_logger(__name__)

__UpperCAmelCase    				=     {
    '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__    ( A ):



 """simple docstring"""







 _lowercase     :					Any      =						'''yolos'''

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






      '''simple docstring'''




      super().__init__(**A_       )

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





class A__    ( A ):



 """simple docstring"""







 _lowercase     :					Union[str, Any]      =						version.parse('''1.11''' )

 @property
 def    __magic_name__       (		self :	List[str]       ):






      '''simple docstring'''




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

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






      '''simple docstring'''




      return 1E-4


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






      '''simple docstring'''




      return 1_2









from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


__UpperCAmelCase    				=     {
    'configuration_lxmert': ['LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'LxmertConfig'],
    'tokenization_lxmert': ['LxmertTokenizer'],
}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __UpperCAmelCase    				=     ['LxmertTokenizerFast']

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __UpperCAmelCase    				=     [
      'LxmertEncoder',
      'LxmertForPreTraining',
      'LxmertForQuestionAnswering',
      'LxmertModel',
      'LxmertPreTrainedModel',
      'LxmertVisualFeatureEncoder',
      'LxmertXLayer',
  ]

try:
  if not is_tf_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __UpperCAmelCase    				=     [
      'TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST',
      'TFLxmertForPreTraining',
      'TFLxmertMainLayer',
      'TFLxmertModel',
      'TFLxmertPreTrainedModel',
      'TFLxmertVisualFeatureEncoder',
  ]


if TYPE_CHECKING:
  from .configuration_lxmert import LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP, LxmertConfig
  from .tokenization_lxmert import LxmertTokenizer

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_lxmert_fast import LxmertTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_lxmert import (
        LxmertEncoder,
        LxmertForPreTraining,
        LxmertForQuestionAnswering,
        LxmertModel,
        LxmertPreTrainedModel,
        LxmertVisualFeatureEncoder,
        LxmertXLayer,
    )

  try:
    if not is_tf_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_tf_lxmert import (
        TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST,
        TFLxmertForPreTraining,
        TFLxmertMainLayer,
        TFLxmertModel,
        TFLxmertPreTrainedModel,
        TFLxmertVisualFeatureEncoder,
    )

else:
  import sys

  __UpperCAmelCase    				=     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






