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


lowerCAmelCase					:    Dict           = logging.get_logger(__name__)

lowerCAmelCase					:    Optional[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 			SCREAMING_SNAKE_CASE__      (     snake_case_):
				lowerCAmelCase_     			=							"""yolos"""







				def __init__(       self						,				A_=768						,				A_=12						,				A_=12						,				A_=3072						,				A_="gelu"						,				A_=0.0						,				A_=0.0						,				A_=0.02						,				A_=1e-12						,				A_=[512, 864]						,				A_=16						,				A_=3						,				A_=True						,				A_=100						,				A_=True						,				A_=False						,				A_=1						,				A_=5						,				A_=2						,				A_=5						,				A_=2						,				A_=0.1						,				**A_						,				)->		Tuple:







											'''simple docstring'''






											super().__init__(**A_     )

											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 			SCREAMING_SNAKE_CASE__      (     snake_case_):
				lowerCAmelCase_     			=							version.parse("""1.11""")







				@property
				def 						UpperCAmelCase_    (       self     )->		Mapping[str, Mapping[int, str]]:







											'''simple docstring'''






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







				@property
				def 						UpperCAmelCase_    (       self     )->		float:







											'''simple docstring'''






											return 1e-4







				@property
				def 						UpperCAmelCase_    (       self     )->		int:







											'''simple docstring'''






											return 12






'''simple docstring'''
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Features, Value
from .base import TaskTemplate


@dataclass(frozen=snake_case_)
class 			SCREAMING_SNAKE_CASE__      (     snake_case_):
				lowerCAmelCase_     			=							field(default="""language-modeling"""							,       metadata={"""include_in_asdict_even_if_is_default""": True})

				lowerCAmelCase_     			=							Features({"""text""": Value("""string""")})
				lowerCAmelCase_     			=							Features({})
				lowerCAmelCase_     			=							"text"







				@property
				def 						UpperCAmelCase_    (       self     )->		Dict[str, str]:







											'''simple docstring'''






											return {self.text_column: "text"}




