






"""simple docstring"""

def 		__lowerCamelCase	(  __UpperCamelCase       )						->    int:

		"""simple docstring"""







		lowerCAmelCase_   :							Any									=			hex_num.strip()
		if not hex_num:
				raise ValueError("No value was passed to the function"       )

		lowerCAmelCase_   :							int									=			hex_num[0] == """-"""
		if is_negative:
				lowerCAmelCase_   :							List[Any]									=			hex_num[1:]

		try:
				lowerCAmelCase_   :							str									=			int(SCREAMING_SNAKE_CASE__      ,       16       )
		except ValueError:
				raise ValueError("Invalid value was passed to the function"       )

		lowerCAmelCase_   :							Dict									=			""""""
		while int_num > 0:
				lowerCAmelCase_   :							str									=			str(int_num % 2       ) + bin_str
				int_num >>= 1

		return int(("-" + bin_str) if is_negative else bin_str       )


if __name__ == "__main__":
					import doctest

					doctest.testmod()


from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase  :					List[str]						    =							logging.get_logger(__name__)

lowercase  :					Any						    =							{
    """uclanlp/visualbert-vqa""": """https://huggingface.co/uclanlp/visualbert-vqa/resolve/main/config.json""",
    """uclanlp/visualbert-vqa-pre""": """https://huggingface.co/uclanlp/visualbert-vqa-pre/resolve/main/config.json""",
    """uclanlp/visualbert-vqa-coco-pre""": (
        """https://huggingface.co/uclanlp/visualbert-vqa-coco-pre/resolve/main/config.json"""
    ),
    """uclanlp/visualbert-vcr""": """https://huggingface.co/uclanlp/visualbert-vcr/resolve/main/config.json""",
    """uclanlp/visualbert-vcr-pre""": """https://huggingface.co/uclanlp/visualbert-vcr-pre/resolve/main/config.json""",
    """uclanlp/visualbert-vcr-coco-pre""": (
        """https://huggingface.co/uclanlp/visualbert-vcr-coco-pre/resolve/main/config.json"""
    ),
    """uclanlp/visualbert-nlvr2""": """https://huggingface.co/uclanlp/visualbert-nlvr2/resolve/main/config.json""",
    """uclanlp/visualbert-nlvr2-pre""": """https://huggingface.co/uclanlp/visualbert-nlvr2-pre/resolve/main/config.json""",
    """uclanlp/visualbert-nlvr2-coco-pre""": (
        """https://huggingface.co/uclanlp/visualbert-nlvr2-coco-pre/resolve/main/config.json"""
    )
    # See all VisualBERT models at https://huggingface.co/models?filter=visual_bert
}

class __snake_case		(      lowerCAmelCase     ):
    _a		:						Union[str, Any]=				"visual_bert"
    def __init__(  self		,snake_case=30522		,snake_case=768		,snake_case=512		,snake_case=12		,snake_case=12		,snake_case=3072		,snake_case="gelu"		,snake_case=0.1		,snake_case=0.1		,snake_case=512		,snake_case=2		,snake_case=0.02		,snake_case=1e-12		,snake_case=False		,snake_case=True		,snake_case=1		,snake_case=0		,snake_case=2		,**snake_case		,):



           '''simple docstring'''







           super().__init__(pad_token_id=snake_case		,bos_token_id=snake_case		,eos_token_id=snake_case		,**snake_case      )

           lowercase							:     Tuple       	=      vocab_size
           lowercase							:     int       	=      max_position_embeddings
           lowercase							:     Optional[Any]       	=      hidden_size
           lowercase							:     int       	=      visual_embedding_dim
           lowercase							:     Tuple       	=      num_hidden_layers
           lowercase							:     str       	=      num_attention_heads
           lowercase							:     Optional[Any]       	=      intermediate_size
           lowercase							:     str       	=      hidden_act
           lowercase							:     Tuple       	=      hidden_dropout_prob
           lowercase							:     List[Any]       	=      attention_probs_dropout_prob
           lowercase							:     Union[str, Any]       	=      initializer_range
           lowercase							:     int       	=      type_vocab_size
           lowercase							:     Union[str, Any]       	=      layer_norm_eps
           lowercase							:     Union[str, Any]       	=      bypass_transformer
           lowercase							:     int       	=      special_visual_initialize
