
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_   (			__lowerCamelCase   ):




	'''simple docstring'''


	_UpperCamelCase     :     str							 =       """yolos"""





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

		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_   (			__lowerCamelCase   ):




	'''simple docstring'''


	_UpperCamelCase     :     Any							 =       version.parse("""1.11"""   )





	@property
	def 	SCREAMING_SNAKE_CASE__						(       self       ):
		return OrderedDict(
		    [
		        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
		    ]       )





	@property
	def 	SCREAMING_SNAKE_CASE__						(       self       ):
		return 1E-4





	@property
	def 	SCREAMING_SNAKE_CASE__						(       self       ):
		return 12



def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE							):
	if not isinstance(__SCREAMING_SNAKE_CASE ,							__SCREAMING_SNAKE_CASE							):
		raise TypeError('Input value must be an \'int\' type'							)

	lowercase       =    0
	while number:
		position += 1
		number >>= 1

	return position


if __name__ == "__main__":
	import doctest

	doctest.testmod()

