


from __future__ import annotations






def 							__lowercase       (			__lowerCAmelCase							:    float ,   __lowerCAmelCase							:    float ,   __lowerCAmelCase							:    float ,   ):
							if (stress, tangential_force, area).count(0       ) != 1:
														raise ValueError('You cannot supply more or less than 2 values'       )
							elif stress < 0:
														raise ValueError('Stress cannot be negative'       )
							elif tangential_force < 0:
														raise ValueError('Tangential Force cannot be negative'       )
							elif area < 0:
														raise ValueError('Area cannot be negative'       )
							elif stress == 0:
														return (
														    "stress",
														    tangential_force / area,
														)
							elif tangential_force == 0:
														return (
														    "tangential_force",
														    stress * area,
														)
							else:
														return (
														    "area",
														    tangential_force / stress,
														)


if __name__ == "__main__":
						import doctest

						doctest.testmod()








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


snake_case							:	Optional[int]					      =				logging.get_logger(__name__)

snake_case							:	Union[str, 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_				):
					UpperCAmelCase__ :   Dict   				=      '''visual_bert'''
					def __init__(				self       :Optional[int]      ,__snake_case       :Any=3_05_22      ,__snake_case       :str=7_68      ,__snake_case       :Any=5_12      ,__snake_case       :Any=12      ,__snake_case       :int=12      ,__snake_case       :str=30_72      ,__snake_case       :int="gelu"      ,__snake_case       :Optional[int]=0.1      ,__snake_case       :str=0.1      ,__snake_case       :Union[str, Any]=5_12      ,__snake_case       :Tuple=2      ,__snake_case       :Union[str, Any]=0.02      ,__snake_case       :Optional[Any]=1E-12      ,__snake_case       :Optional[Any]=False      ,__snake_case       :int=True      ,__snake_case       :Any=1      ,__snake_case       :Optional[int]=0      ,__snake_case       :Tuple=2      ,**__snake_case       :Any      ,) ->   Union[str, Any]:
												super().__init__(pad_token_id=__snake_case      ,bos_token_id=__snake_case      ,eos_token_id=__snake_case      ,**__snake_case				)

												a__					=					vocab_size
												a__					=					max_position_embeddings
												a__					=					hidden_size
												a__					=					visual_embedding_dim
												a__					=					num_hidden_layers
												a__					=					num_attention_heads
												a__					=					intermediate_size
												a__					=					hidden_act
												a__					=					hidden_dropout_prob
												a__					=					attention_probs_dropout_prob
												a__					=					initializer_range
												a__					=					type_vocab_size
												a__					=					layer_norm_eps
												a__					=					bypass_transformer
												a__					=					special_visual_initialize




