from collections import OrderedDict
from typing import Mapping

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


_SCREAMING_SNAKE_CASE     =     logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE     =     {
    """google/mobilebert-uncased""": """https://huggingface.co/google/mobilebert-uncased/resolve/main/config.json"""
}







class        UpperCAmelCase_					(				_a     ):
    UpperCAmelCase_      :							str    			=				MOBILEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
    UpperCAmelCase_      :							int    			=				'mobilebert'




    def __init__(       self	: str   ,   lowerCAmelCase	: Optional[Any]=30522   ,   lowerCAmelCase	: List[Any]=512   ,   lowerCAmelCase	: int=24   ,   lowerCAmelCase	: Dict=4   ,   lowerCAmelCase	: str=512   ,   lowerCAmelCase	: Union[str, Any]="relu"   ,   lowerCAmelCase	: Dict=0.0   ,   lowerCAmelCase	: str=0.1   ,   lowerCAmelCase	: Optional[Any]=512   ,   lowerCAmelCase	: int=2   ,   lowerCAmelCase	: Union[str, Any]=0.02   ,   lowerCAmelCase	: Optional[Any]=1e-1_2   ,   lowerCAmelCase	: str=0   ,   lowerCAmelCase	: Optional[int]=128   ,   lowerCAmelCase	: str=True   ,   lowerCAmelCase	: Dict=True   ,   lowerCAmelCase	: List[str]=128   ,   lowerCAmelCase	: Tuple=False   ,   lowerCAmelCase	: Union[str, Any]=True   ,   lowerCAmelCase	: List[str]=4   ,   lowerCAmelCase	: Tuple="no_norm"   ,   lowerCAmelCase	: List[str]=True   ,   lowerCAmelCase	: List[Any]=None   ,   **lowerCAmelCase	: str   ,   )						->			Optional[int]:
      super().__init__(pad_token_id=lowerCAmelCase   ,   **lowerCAmelCase )

      a__  		=  vocab_size
      a__  		=  hidden_size
      a__  		=  num_hidden_layers
      a__  		=  num_attention_heads
      a__  		=  hidden_act
      a__  		=  intermediate_size
      a__  		=  hidden_dropout_prob
      a__  		=  attention_probs_dropout_prob
      a__  		=  max_position_embeddings
      a__  		=  type_vocab_size
      a__  		=  initializer_range
      a__  		=  layer_norm_eps
      a__  		=  embedding_size
      a__  		=  trigram_input
      a__  		=  use_bottleneck
      a__  		=  intra_bottleneck_size
      a__  		=  use_bottleneck_attention
      a__  		=  key_query_shared_bottleneck
      a__  		=  num_feedforward_networks
      a__  		=  normalization_type
      a__  		=  classifier_activation

      if self.use_bottleneck:
        a__  		=  intra_bottleneck_size
      else:
        a__  		=  hidden_size

      a__  		=  classifier_dropout







class        UpperCAmelCase_					(				_a     ):




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


def 					__lowercase						(    lowerCamelCase__       )					->int:

  '''simple docstring'''




  if not isinstance(lowerCamelCase__			,					lowerCamelCase__       ):
    raise ValueError("double_factorial() only accepts integral values"       )
  if n < 0:
    raise ValueError("double_factorial() not defined for negative values"       )
  return 1 if n <= 1 else n * double_factorial(n - 2       )


if __name__ == "__main__":
     import doctest

     doctest.testmod()

