





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_           =	{
    "bert-base-uncased": "https://huggingface.co/bert-base-uncased/resolve/main/config.json",
    "bert-large-uncased": "https://huggingface.co/bert-large-uncased/resolve/main/config.json",
    "bert-base-cased": "https://huggingface.co/bert-base-cased/resolve/main/config.json",
    "bert-large-cased": "https://huggingface.co/bert-large-cased/resolve/main/config.json",
    "bert-base-multilingual-uncased": "https://huggingface.co/bert-base-multilingual-uncased/resolve/main/config.json",
    "bert-base-multilingual-cased": "https://huggingface.co/bert-base-multilingual-cased/resolve/main/config.json",
    "bert-base-chinese": "https://huggingface.co/bert-base-chinese/resolve/main/config.json",
    "bert-base-german-cased": "https://huggingface.co/bert-base-german-cased/resolve/main/config.json",
    "bert-large-uncased-whole-word-masking": (
        "https://huggingface.co/bert-large-uncased-whole-word-masking/resolve/main/config.json"
    ),
    "bert-large-cased-whole-word-masking": (
        "https://huggingface.co/bert-large-cased-whole-word-masking/resolve/main/config.json"
    ),
    "bert-large-uncased-whole-word-masking-finetuned-squad": (
        "https://huggingface.co/bert-large-uncased-whole-word-masking-finetuned-squad/resolve/main/config.json"
    ),
    "bert-large-cased-whole-word-masking-finetuned-squad": (
        "https://huggingface.co/bert-large-cased-whole-word-masking-finetuned-squad/resolve/main/config.json"
    ),
    "bert-base-cased-finetuned-mrpc": "https://huggingface.co/bert-base-cased-finetuned-mrpc/resolve/main/config.json",
    "bert-base-german-dbmdz-cased": "https://huggingface.co/bert-base-german-dbmdz-cased/resolve/main/config.json",
    "bert-base-german-dbmdz-uncased": "https://huggingface.co/bert-base-german-dbmdz-uncased/resolve/main/config.json",
    "cl-tohoku/bert-base-japanese": "https://huggingface.co/cl-tohoku/bert-base-japanese/resolve/main/config.json",
    "cl-tohoku/bert-base-japanese-whole-word-masking": (
        "https://huggingface.co/cl-tohoku/bert-base-japanese-whole-word-masking/resolve/main/config.json"
    ),
    "cl-tohoku/bert-base-japanese-char": (
        "https://huggingface.co/cl-tohoku/bert-base-japanese-char/resolve/main/config.json"
    ),
    "cl-tohoku/bert-base-japanese-char-whole-word-masking": (
        "https://huggingface.co/cl-tohoku/bert-base-japanese-char-whole-word-masking/resolve/main/config.json"
    ),
    "TurkuNLP/bert-base-finnish-cased-v1": (
        "https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1/resolve/main/config.json"
    ),
    "TurkuNLP/bert-base-finnish-uncased-v1": (
        "https://huggingface.co/TurkuNLP/bert-base-finnish-uncased-v1/resolve/main/config.json"
    ),
    "wietsedv/bert-base-dutch-cased": "https://huggingface.co/wietsedv/bert-base-dutch-cased/resolve/main/config.json",
    # See all BERT models at https://huggingface.co/models?filter=bert
}




class 			__UpperCamelCase    (							A__    ):
     __A	:  Union[str, Any]							  =   """bert"""





     def __init__(     self				,							_UpperCamelCase=30522				,							_UpperCamelCase=768				,							_UpperCamelCase=12				,							_UpperCamelCase=12				,							_UpperCamelCase=3072				,							_UpperCamelCase="gelu"				,							_UpperCamelCase=0.1				,							_UpperCamelCase=0.1				,							_UpperCamelCase=512				,							_UpperCamelCase=2				,							_UpperCamelCase=0.02				,							_UpperCamelCase=1e-12				,							_UpperCamelCase=0				,							_UpperCamelCase="absolute"				,							_UpperCamelCase=True				,							_UpperCamelCase=None				,							**_UpperCamelCase				,							):
        super().__init__(pad_token_id=_UpperCamelCase				,							**_UpperCamelCase					)

        _UpperCAmelCase           =   vocab_size
        _UpperCAmelCase           =   hidden_size
        _UpperCAmelCase           =   num_hidden_layers
        _UpperCAmelCase           =   num_attention_heads
        _UpperCAmelCase           =   hidden_act
        _UpperCAmelCase           =   intermediate_size
        _UpperCAmelCase           =   hidden_dropout_prob
        _UpperCAmelCase           =   attention_probs_dropout_prob
        _UpperCAmelCase           =   max_position_embeddings
        _UpperCAmelCase           =   type_vocab_size
        _UpperCAmelCase           =   initializer_range
        _UpperCAmelCase           =   layer_norm_eps
        _UpperCAmelCase           =   position_embedding_type
        _UpperCAmelCase           =   use_cache
        _UpperCAmelCase           =   classifier_dropout




class 			__UpperCamelCase    (							A__    ):





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






def      A__       (    SCREAMING_SNAKE_CASE_   :      int						)  ->  bool:






   """simple docstring"""







   if not isinstance(SCREAMING_SNAKE_CASE_				,	SCREAMING_SNAKE_CASE_						):
      _UpperCAmelCase           =   F'''Input value of [number={number}] must be an integer'''
      raise TypeError(SCREAMING_SNAKE_CASE_						)
   if number < 0:
      return False
   _UpperCAmelCase           =   number * number
   while number > 0:
      if number % 10 != number_square % 10:
         return False
      number //= 10
      number_square //= 10
   return True


if __name__ == "__main__":
   import doctest

   doctest.testmod()