



from collections import OrderedDict
from typing import Mapping

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


a_						:     Tuple	     =		logging.get_logger(__name__)

a_						:     Any	     =		{
    "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    lowerCamelCase__  (						_UpperCAmelCase):
     """simple docstring"""



     _A       =			'distilbert'
     _A       =			{
         'hidden_size': 'dim',
         'num_attention_heads': 'n_heads',
         'num_hidden_layers': 'n_layers',
     }







     def __init__(self				,			__a=3_05_22				,			__a=5_12				,			__a=False				,			__a=6				,			__a=12				,			__a=7_68				,			__a=4 * 7_68				,			__a=0.1				,			__a=0.1				,			__a="gelu"				,			__a=0.02				,			__a=0.1				,			__a=0.2				,			__a=0				,			**__a				,			):






           '''simple docstring'''



           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__(**lowercase_				,			pad_token_id=lowercase_    )





class    lowerCamelCase__  (						_UpperCAmelCase):
     """simple docstring"""



     @property
     def 						_a      (self    ):






           '''simple docstring'''



           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


a_						:     List[str]	     =		{
    'configuration_clipseg': [
        'CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'CLIPSegConfig',
        'CLIPSegTextConfig',
        'CLIPSegVisionConfig',
    ],
    'processing_clipseg': ['CLIPSegProcessor'],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     a_						:     Any	     =		[
         'CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST',
         'CLIPSegModel',
         'CLIPSegPreTrainedModel',
         'CLIPSegTextModel',
         'CLIPSegVisionModel',
         'CLIPSegForImageSegmentation',
     ]

if TYPE_CHECKING:
     from .configuration_clipseg import (
         CLIPSEG_PRETRAINED_CONFIG_ARCHIVE_MAP,
         CLIPSegConfig,
         CLIPSegTextConfig,
         CLIPSegVisionConfig,
     )
     from .processing_clipseg import CLIPSegProcessor

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_clipseg import (
              CLIPSEG_PRETRAINED_MODEL_ARCHIVE_LIST,
              CLIPSegForImageSegmentation,
              CLIPSegModel,
              CLIPSegPreTrainedModel,
              CLIPSegTextModel,
              CLIPSegVisionModel,
          )

else:
     import sys

     a_						:     Dict	     =		_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)