



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


UpperCamelCase__       :	Union[str, Any]    = logging.get_logger(__name__)

UpperCamelCase__       :	Union[str, 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  (							lowerCamelCase__    ):


			'''simple docstring'''

			_A      :		Tuple			    =		'''yolos'''

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





					"""simple docstring"""






					super().__init__(**lowerCAmelCase__						)

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






class 						_UpperCamelCase  (							lowerCamelCase__    ):


			'''simple docstring'''

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

			@property
			def UpperCamelCase__					(							self     : int						):





					"""simple docstring"""






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

			@property
			def UpperCamelCase__					(							self     : Any						):





					"""simple docstring"""






					return 1E-4



			@property
			def UpperCamelCase__					(							self     : Dict						):





					"""simple docstring"""






					return 1_2




'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCamelCase__       :	Any    = {
    '''configuration_instructblip''': [
        '''INSTRUCTBLIP_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''InstructBlipConfig''',
        '''InstructBlipQFormerConfig''',
        '''InstructBlipVisionConfig''',
    ],
    '''processing_instructblip''': ['''InstructBlipProcessor'''],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						UpperCamelCase__       :	Optional[Any]    = [
						    '''INSTRUCTBLIP_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''InstructBlipQFormerModel''',
						    '''InstructBlipPreTrainedModel''',
						    '''InstructBlipForConditionalGeneration''',
						    '''InstructBlipVisionModel''',
						]

if TYPE_CHECKING:
						from .configuration_instructblip import (
						    INSTRUCTBLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    InstructBlipConfig,
						    InstructBlipQFormerConfig,
						    InstructBlipVisionConfig,
						)
						from .processing_instructblip import InstructBlipProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_instructblip import (
												    INSTRUCTBLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
												    InstructBlipForConditionalGeneration,
												    InstructBlipPreTrainedModel,
												    InstructBlipQFormerModel,
												    InstructBlipVisionModel,
												)

else:
						import sys

						UpperCamelCase__       :	str    = _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)