
"""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


_lowercase							=				logging.get_logger(__name__)

_lowercase							=				{
    '''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'''







							_lowerCamelCase					:			Tuple          =   """yolos"""
							def __init__(     self  ,    _lowerCamelCase=768  ,    _lowerCamelCase=12  ,    _lowerCamelCase=12  ,    _lowerCamelCase=3_072  ,    _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  ,    )			->							Optional[int]:




										'''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     ( __a       ):



							'''simple docstring'''







							_lowerCamelCase					:			List[str]          =   version.parse("""1.11"""       )
							@property
							def   SCREAMING_SNAKE_CASE						(     self       )			->							Mapping[str, Mapping[int, str]]:




										'''simple docstring'''
										return OrderedDict(
										    [
										        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
										    ]       )
							@property
							def   SCREAMING_SNAKE_CASE						(     self       )			->							float:




										'''simple docstring'''
										return 1e-4





							@property
							def   SCREAMING_SNAKE_CASE						(     self       )			->							int:




										'''simple docstring'''
										return 12







"""simple docstring"""






_lowercase							=				'''
# Installazione di Transformers
! pip install transformers datasets
# Per installare dalla fonte invece dell\'ultima versione rilasciata, commenta il comando sopra e
# rimuovi la modalità commento al comando seguente.
# ! pip install git+https://github.com/huggingface/transformers.git
'''

_lowercase							=				[{'''type''': '''code''', '''content''': INSTALL_CONTENT}]
_lowercase							=				{
    '''{processor_class}''': '''FakeProcessorClass''',
    '''{model_class}''': '''FakeModelClass''',
    '''{object_class}''': '''FakeObjectClass''',
}





