




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


lowercase__							:	Optional[Any]											=		logging.get_logger(__name__)

lowercase__							:	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 						UpperCAmelCase  (							UpperCAmelCase__     ):







						'''simple docstring'''





						lowerCAmelCase_							=  '''visual_bert'''






						def __init__(		self				:	List[str]			,      __lowercase				:	Dict=3_05_22			,      __lowercase				:	Dict=7_68			,      __lowercase				:	str=5_12			,      __lowercase				:	int=12			,      __lowercase				:	Optional[Any]=12			,      __lowercase				:	Union[str, Any]=30_72			,      __lowercase				:	List[str]="gelu"			,      __lowercase				:	str=0.1			,      __lowercase				:	Optional[Any]=0.1			,      __lowercase				:	int=5_12			,      __lowercase				:	Union[str, Any]=2			,      __lowercase				:	Optional[Any]=0.02			,      __lowercase				:	Tuple=1E-12			,      __lowercase				:	Optional[Any]=False			,      __lowercase				:	Optional[int]=True			,      __lowercase				:	Dict=1			,      __lowercase				:	Tuple=0			,      __lowercase				:	int=2			,      **__lowercase				:	int			,      ):






							"""simple docstring"""






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

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






def 		lowerCamelCase__       (						_A	,      _A				):







	'''simple docstring'''





	_validate_point(_A				)
	_validate_point(_A				)
	if len(_A				) != len(_A				):
		raise ValueError("Both points must be in the same n-dimensional space"				)

	return float(sum(abs(a - b				) for a, b in zip(_A	,      _A				)				)				)


def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	if point:
		if isinstance(_A	,      _A				):
			for item in point:
				if not isinstance(_A	,      (int, float)				):
					snake_case_						       =	(
					    "Expected a list of numbers as input, found "
					    f"{type(_A				).__name__}"
					)
					raise TypeError(_A				)
		else:
			snake_case_						       =	f"Expected a list of numbers as input, found {type(_A				).__name__}"
			raise TypeError(_A				)
	else:
		raise ValueError("Missing an input"				)


def 		lowerCamelCase__       (						_A	,      _A				):







	'''simple docstring'''





	_validate_point(_A				)
	_validate_point(_A				)
	if len(_A				) != len(_A				):
		raise ValueError("Both points must be in the same n-dimensional space"				)

	return float(sum(abs(x - y				) for x, y in zip(_A	,      _A				)				)				)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
