




from collections import OrderedDict
from typing import Mapping

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


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

lowercase			:      Optional[Any]			=					{
    """nghuyong/ernie-1.0-base-zh""": """https://huggingface.co/nghuyong/ernie-1.0-base-zh/resolve/main/config.json""",
    """nghuyong/ernie-2.0-base-en""": """https://huggingface.co/nghuyong/ernie-2.0-base-en/resolve/main/config.json""",
    """nghuyong/ernie-2.0-large-en""": """https://huggingface.co/nghuyong/ernie-2.0-large-en/resolve/main/config.json""",
    """nghuyong/ernie-3.0-base-zh""": """https://huggingface.co/nghuyong/ernie-3.0-base-zh/resolve/main/config.json""",
    """nghuyong/ernie-3.0-medium-zh""": """https://huggingface.co/nghuyong/ernie-3.0-medium-zh/resolve/main/config.json""",
    """nghuyong/ernie-3.0-mini-zh""": """https://huggingface.co/nghuyong/ernie-3.0-mini-zh/resolve/main/config.json""",
    """nghuyong/ernie-3.0-micro-zh""": """https://huggingface.co/nghuyong/ernie-3.0-micro-zh/resolve/main/config.json""",
    """nghuyong/ernie-3.0-nano-zh""": """https://huggingface.co/nghuyong/ernie-3.0-nano-zh/resolve/main/config.json""",
    """nghuyong/ernie-gram-zh""": """https://huggingface.co/nghuyong/ernie-gram-zh/resolve/main/config.json""",
    """nghuyong/ernie-health-zh""": """https://huggingface.co/nghuyong/ernie-health-zh/resolve/main/config.json""",
}







class 				_a   (a__  ):





     '''simple docstring'''



     lowerCAmelCase_     :    Dict									=				"""ernie"""







     def __init__(							self       ,__a=30_522       ,__a=768       ,__a=12       ,__a=12       ,__a=3_072       ,__a="gelu"       ,__a=0.1       ,__a=0.1       ,__a=512       ,__a=2       ,__a=3       ,__a=False       ,__a=0.02       ,__a=1E-12       ,__a=0       ,__a="absolute"       ,__a=True       ,__a=None       ,**__a       ,)			->							str:
          super().__init__(pad_token_id=__a       ,**__a       )

          snake_case :			List[str]					   = vocab_size
          snake_case :			Optional[int]					   = hidden_size
          snake_case :			Optional[int]					   = num_hidden_layers
          snake_case :			Optional[Any]					   = num_attention_heads
          snake_case :			Any					   = hidden_act
          snake_case :			Optional[int]					   = intermediate_size
          snake_case :			Optional[Any]					   = hidden_dropout_prob
          snake_case :			str					   = attention_probs_dropout_prob
          snake_case :			str					   = max_position_embeddings
          snake_case :			Dict					   = type_vocab_size
          snake_case :			List[Any]					   = task_type_vocab_size
          snake_case :			str					   = use_task_id
          snake_case :			Optional[Any]					   = initializer_range
          snake_case :			Optional[Any]					   = layer_norm_eps
          snake_case :			List[str]					   = position_embedding_type
          snake_case :			int					   = use_cache
          snake_case :			Optional[Any]					   = classifier_dropout







class 				_a   (a__  ):





     '''simple docstring'''



     @property
     def  snake_case_			(							self       )			->							Mapping[str, Mapping[int, str]]:
          if self.task == "multiple-choice":
               snake_case :			Tuple					   = {0: """batch""", 1: """choice""", 2: """sequence"""}
          else:
               snake_case :			Any					   = {0: """batch""", 1: """sequence"""}
          return OrderedDict(
              [
                  ("""input_ids""", dynamic_axis),
                  ("""attention_mask""", dynamic_axis),
                  ("""token_type_ids""", dynamic_axis),
                  ("""task_type_ids""", dynamic_axis),
              ]       )









'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase			:      Any			=					{"""configuration_visual_bert""": ["""VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """VisualBertConfig"""]}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      lowercase			:      Optional[int]			=					[
          """VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """VisualBertForMultipleChoice""",
          """VisualBertForPreTraining""",
          """VisualBertForQuestionAnswering""",
          """VisualBertForRegionToPhraseAlignment""",
          """VisualBertForVisualReasoning""",
          """VisualBertLayer""",
          """VisualBertModel""",
          """VisualBertPreTrainedModel""",
      ]


if TYPE_CHECKING:
      from .configuration_visual_bert import VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, VisualBertConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_visual_bert import (
                VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                VisualBertForMultipleChoice,
                VisualBertForPreTraining,
                VisualBertForQuestionAnswering,
                VisualBertForRegionToPhraseAlignment,
                VisualBertForVisualReasoning,
                VisualBertLayer,
                VisualBertModel,
                VisualBertPreTrainedModel,
            )


else:
      import sys

      lowercase			:      List[Any]			=					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



