


'''simple docstring'''


from collections import OrderedDict
from typing import Mapping

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


lowerCamelCase__    	=     logging.get_logger(__name__)

lowerCamelCase__    	=     {
    '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 	lowerCAmelCase__			(			UpperCAmelCase__	):
			lowerCAmelCase :	Dict          =     "bert"




			def __init__(		self  :     Any	,  lowerCamelCase__  :     List[Any]=3_05_22	,  lowerCamelCase__  :     Dict=7_68	,  lowerCamelCase__  :     List[str]=12	,  lowerCamelCase__  :     List[Any]=12	,  lowerCamelCase__  :     str=30_72	,  lowerCamelCase__  :     List[Any]="gelu"	,  lowerCamelCase__  :     int=0.1	,  lowerCamelCase__  :     str=0.1	,  lowerCamelCase__  :     Tuple=5_12	,  lowerCamelCase__  :     List[str]=2	,  lowerCamelCase__  :     Optional[Any]=0.0_2	,  lowerCamelCase__  :     List[Any]=1E-12	,  lowerCamelCase__  :     str=0	,  lowerCamelCase__  :     Optional[Any]="absolute"	,  lowerCamelCase__  :     Optional[int]=True	,  lowerCamelCase__  :     Tuple=None	,  **lowerCamelCase__  :     str	,  )   ->Optional[int]:



					'''simple docstring'''







					super().__init__(pad_token_id=lowerCamelCase__	,  **lowerCamelCase__ )

					_UpperCAmelCase		:       int								=      vocab_size
					_UpperCAmelCase		:       Union[str, Any]								=      hidden_size
					_UpperCAmelCase		:       List[Any]								=      num_hidden_layers
					_UpperCAmelCase		:       Tuple								=      num_attention_heads
					_UpperCAmelCase		:       str								=      hidden_act
					_UpperCAmelCase		:       Optional[Any]								=      intermediate_size
					_UpperCAmelCase		:       Dict								=      hidden_dropout_prob
					_UpperCAmelCase		:       Optional[Any]								=      attention_probs_dropout_prob
					_UpperCAmelCase		:       List[Any]								=      max_position_embeddings
					_UpperCAmelCase		:       Optional[int]								=      type_vocab_size
					_UpperCAmelCase		:       Union[str, Any]								=      initializer_range
					_UpperCAmelCase		:       str								=      layer_norm_eps
					_UpperCAmelCase		:       Any								=      position_embedding_type
					_UpperCAmelCase		:       Any								=      use_cache
					_UpperCAmelCase		:       Union[str, Any]								=      classifier_dropout






class 	lowerCAmelCase__			(			UpperCAmelCase__	):




			@property
			def 							lowerCAmelCase__    (		self  :     Tuple )   ->Mapping[str, Mapping[int, str]]:



					'''simple docstring'''







					if self.task == "multiple-choice":
							_UpperCAmelCase		:       Optional[Any]								=      {0: "batch", 1: "choice", 2: "sequence"}
					else:
							_UpperCAmelCase		:       List[Any]								=      {0: "batch", 1: "sequence"}
					return OrderedDict(
					    [
					        ("input_ids", dynamic_axis),
					        ("attention_mask", dynamic_axis),
					        ("token_type_ids", dynamic_axis),
					    ] )







'''simple docstring'''


from __future__ import annotations

import numpy as np






def  __lowerCAmelCase (__lowerCAmelCase   ):
		return np.maximum(0      , __lowerCAmelCase   )


if __name__ == "__main__":
						print(np.array(relu([-1, 0, 5])))  # --> [0, 0, 5]



