





from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


UpperCAmelCase__						:			Optional[int]									=logging.get_logger(__name__)

UpperCAmelCase__						:			Optional[int]									={
    '''distilbert-base-uncased''': '''https://huggingface.co/distilbert-base-uncased/resolve/main/config.json''',
    '''distilbert-base-uncased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-cased''': '''https://huggingface.co/distilbert-base-cased/resolve/main/config.json''',
    '''distilbert-base-cased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-german-cased''': '''https://huggingface.co/distilbert-base-german-cased/resolve/main/config.json''',
    '''distilbert-base-multilingual-cased''': (
        '''https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/config.json'''
    ),
    '''distilbert-base-uncased-finetuned-sst-2-english''': (
        '''https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english/resolve/main/config.json'''
    ),
}

class       __A     (						a    ):
				__A      =				"""distilbert"""
				__A      =				{
				    """hidden_size""": """dim""",
				    """num_attention_heads""": """n_heads""",
				    """num_hidden_layers""": """n_layers""",
				}


				def __init__(		self   , UpperCAmelCase_=30522   , UpperCAmelCase_=512   , UpperCAmelCase_=False   , UpperCAmelCase_=6   , UpperCAmelCase_=12   , UpperCAmelCase_=768   , UpperCAmelCase_=4 * 768   , UpperCAmelCase_=0.1   , UpperCAmelCase_=0.1   , UpperCAmelCase_="gelu"   , UpperCAmelCase_=0.0_2   , UpperCAmelCase_=0.1   , UpperCAmelCase_=0.2   , UpperCAmelCase_=0   , **UpperCAmelCase_   , ):
								lowerCamelCase	 =vocab_size
								lowerCamelCase	 =max_position_embeddings
								lowerCamelCase	 =sinusoidal_pos_embds
								lowerCamelCase	 =n_layers
								lowerCamelCase	 =n_heads
								lowerCamelCase	 =dim
								lowerCamelCase	 =hidden_dim
								lowerCamelCase	 =dropout
								lowerCamelCase	 =attention_dropout
								lowerCamelCase	 =activation
								lowerCamelCase	 =initializer_range
								lowerCamelCase	 =qa_dropout
								lowerCamelCase	 =seq_classif_dropout
								super().__init__(**UpperCAmelCase_   , pad_token_id=UpperCAmelCase_							)




class       __A     (						a    ):


				@property
				def _snake_case       (		self							):
								if self.task == "multiple-choice":
												lowerCamelCase	 ={0: """batch""", 1: """choice""", 2: """sequence"""}
								else:
												lowerCamelCase	 ={0: """batch""", 1: """sequence"""}
								return OrderedDict(
								    [
								        ("""input_ids""", dynamic_axis),
								        ("""attention_mask""", dynamic_axis),
								    ]							)












from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


UpperCAmelCase__						:			List[Any]									={'''configuration_yolos''': ['''YOLOS_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''YolosConfig''', '''YolosOnnxConfig''']}

try:
							if not is_vision_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCAmelCase__						:			Dict									=['''YolosFeatureExtractor''']
							UpperCAmelCase__						:			List[Any]									=['''YolosImageProcessor''']

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCAmelCase__						:			Optional[Any]									=[
							    '''YOLOS_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''YolosForObjectDetection''',
							    '''YolosModel''',
							    '''YolosPreTrainedModel''',
							]


if TYPE_CHECKING:
							from .configuration_yolos import YOLOS_PRETRAINED_CONFIG_ARCHIVE_MAP, YolosConfig, YolosOnnxConfig

							try:
														if not is_vision_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .feature_extraction_yolos import YolosFeatureExtractor
														from .image_processing_yolos import YolosImageProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_yolos import (
														    YOLOS_PRETRAINED_MODEL_ARCHIVE_LIST,
														    YolosForObjectDetection,
														    YolosModel,
														    YolosPreTrainedModel,
														)


else:
							import sys

							UpperCAmelCase__						:			Optional[Any]									=_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





