






from collections import OrderedDict
from typing import Mapping

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


__UpperCAmelCase      =				logging.get_logger(__name__)

__UpperCAmelCase      =				{
    "google/electra-small-generator": "https://huggingface.co/google/electra-small-generator/resolve/main/config.json",
    "google/electra-base-generator": "https://huggingface.co/google/electra-base-generator/resolve/main/config.json",
    "google/electra-large-generator": "https://huggingface.co/google/electra-large-generator/resolve/main/config.json",
    "google/electra-small-discriminator": (
        "https://huggingface.co/google/electra-small-discriminator/resolve/main/config.json"
    ),
    "google/electra-base-discriminator": (
        "https://huggingface.co/google/electra-base-discriminator/resolve/main/config.json"
    ),
    "google/electra-large-discriminator": (
        "https://huggingface.co/google/electra-large-discriminator/resolve/main/config.json"
    ),
}
class 	a_(		lowercase__	):



     """simple docstring"""



     __snake_case		:				List[Any]  					='''electra'''





     def __init__(		self					:	int  ,  lowerCAmelCase__					:	Any=3_0_5_2_2  ,  lowerCAmelCase__					:	List[str]=1_2_8  ,  lowerCAmelCase__					:	Optional[int]=2_5_6  ,  lowerCAmelCase__					:	List[str]=1_2  ,  lowerCAmelCase__					:	Dict=4  ,  lowerCAmelCase__					:	List[Any]=1_0_2_4  ,  lowerCAmelCase__					:	List[Any]="gelu"  ,  lowerCAmelCase__					:	Union[str, Any]=0.1  ,  lowerCAmelCase__					:	List[str]=0.1  ,  lowerCAmelCase__					:	Tuple=5_1_2  ,  lowerCAmelCase__					:	int=2  ,  lowerCAmelCase__					:	int=0.02  ,  lowerCAmelCase__					:	str=1e-12  ,  lowerCAmelCase__					:	List[str]="first"  ,  lowerCAmelCase__					:	Any=True  ,  lowerCAmelCase__					:	List[Any]="gelu"  ,  lowerCAmelCase__					:	Optional[Any]=0.1  ,  lowerCAmelCase__					:	List[Any]=0  ,  lowerCAmelCase__					:	List[str]="absolute"  ,  lowerCAmelCase__					:	Tuple=True  ,  lowerCAmelCase__					:	List[str]=None  ,  **lowerCAmelCase__					:	int  ,  )							->	List[str]:

      """simple docstring"""
      super().__init__(pad_token_id=lowerCAmelCase__  ,  **lowerCAmelCase__)

      SCREAMING_SNAKE_CASE				    =		vocab_size
      SCREAMING_SNAKE_CASE				    =		embedding_size
      SCREAMING_SNAKE_CASE				    =		hidden_size
      SCREAMING_SNAKE_CASE				    =		num_hidden_layers
      SCREAMING_SNAKE_CASE				    =		num_attention_heads
      SCREAMING_SNAKE_CASE				    =		intermediate_size
      SCREAMING_SNAKE_CASE				    =		hidden_act
      SCREAMING_SNAKE_CASE				    =		hidden_dropout_prob
      SCREAMING_SNAKE_CASE				    =		attention_probs_dropout_prob
      SCREAMING_SNAKE_CASE				    =		max_position_embeddings
      SCREAMING_SNAKE_CASE				    =		type_vocab_size
      SCREAMING_SNAKE_CASE				    =		initializer_range
      SCREAMING_SNAKE_CASE				    =		layer_norm_eps

      SCREAMING_SNAKE_CASE				    =		summary_type
      SCREAMING_SNAKE_CASE				    =		summary_use_proj
      SCREAMING_SNAKE_CASE				    =		summary_activation
      SCREAMING_SNAKE_CASE				    =		summary_last_dropout
      SCREAMING_SNAKE_CASE				    =		position_embedding_type
      SCREAMING_SNAKE_CASE				    =		use_cache
      SCREAMING_SNAKE_CASE				    =		classifier_dropout

class 	a_(		lowercase__	):



     """simple docstring"""



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

      """simple docstring"""
      if self.task == "multiple-choice":
       SCREAMING_SNAKE_CASE				    =		{0: 'batch', 1: 'choice', 2: 'sequence'}
      else:
       SCREAMING_SNAKE_CASE				    =		{0: 'batch', 1: 'sequence'}
      return OrderedDict(
          [
              ('input_ids', dynamic_axis),
              ('attention_mask', dynamic_axis),
              ('token_type_ids', dynamic_axis),
          ])







"""simple docstring"""

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


a__			:						Tuple							=			{
    """configuration_segformer""": ["""SEGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""", """SegformerConfig""", """SegformerOnnxConfig"""]
}

try:
							if not is_vision_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a__			:						List[str]							=			["""SegformerFeatureExtractor"""]
							a__			:						str							=			["""SegformerImageProcessor"""]

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a__			:						Optional[Any]							=			[
							    """SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """SegformerDecodeHead""",
							    """SegformerForImageClassification""",
							    """SegformerForSemanticSegmentation""",
							    """SegformerLayer""",
							    """SegformerModel""",
							    """SegformerPreTrainedModel""",
							]

try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							a__			:						List[Any]							=			[
							    """TF_SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """TFSegformerDecodeHead""",
							    """TFSegformerForImageClassification""",
							    """TFSegformerForSemanticSegmentation""",
							    """TFSegformerModel""",
							    """TFSegformerPreTrainedModel""",
							]


if TYPE_CHECKING:
							from .configuration_segformer import SEGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, SegformerConfig, SegformerOnnxConfig

							try:
														if not is_vision_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .feature_extraction_segformer import SegformerFeatureExtractor
														from .image_processing_segformer import SegformerImageProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_segformer import (
														    SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    SegformerDecodeHead,
														    SegformerForImageClassification,
														    SegformerForSemanticSegmentation,
														    SegformerLayer,
														    SegformerModel,
														    SegformerPreTrainedModel,
														)
							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_segformer import (
														    TF_SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TFSegformerDecodeHead,
														    TFSegformerForImageClassification,
														    TFSegformerForSemanticSegmentation,
														    TFSegformerModel,
														    TFSegformerPreTrainedModel,
														)

else:
							import sys

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


