


"""simple docstring"""




from __future__ import annotations

from numpy import array, cos, cross, floataa, radians, sin
from numpy.typing import NDArray





def       a_ (	lowercase__ :float,			lowercase__ :float,			lowercase__ :bool = False     ):
			if radian_mode:
						return [magnitude * cos(lowercase__     ), magnitude * sin(lowercase__     )]
			return [magnitude * cos(radians(lowercase__     )     ), magnitude * sin(radians(lowercase__     )     )]





def       a_ (	lowercase__ :NDArray[floataa],			lowercase__ :NDArray[floataa],			lowercase__ :float = 10**-1     ):
			__lowerCamelCase          =      cross(lowercase__,			lowercase__     )
			__lowerCamelCase          =      sum(lowercase__     )
			return abs(lowercase__     ) < eps


if __name__ == "__main__":
					# Test to check if it works
					__magic_name__						: int    =				array(
					    [
					        polar_force(7_1_8.4, 1_8_0 - 3_0),
					        polar_force(8_7_9.5_4, 4_5),
					        polar_force(1_0_0, -9_0),
					    ]
					)

					__magic_name__						: NDArray[floataa]    =				array([[0, 0], [0, 0], [0, 0]])

					assert in_static_equilibrium(forces, location)

					# Problem 1 in image_data/2D_problems.jpg
					__magic_name__						: Optional[int]    =				array(
					    [
					        polar_force(3_0 * 9.8_1, 1_5),
					        polar_force(2_1_5, 1_8_0 - 4_5),
					        polar_force(2_6_4, 9_0 - 3_0),
					    ]
					)

					__magic_name__						: Tuple    =				array([[0, 0], [0, 0], [0, 0]])

					assert in_static_equilibrium(forces, location)

					# Problem in image_data/2D_problems_1.jpg
					__magic_name__						: List[str]    =				array([[0, -2_0_0_0], [0, -1_2_0_0], [0, 1_5_6_0_0], [0, -1_2_4_0_0]])

					__magic_name__						: List[str]    =				array([[0, 0], [6, 0], [1_0, 0], [1_2, 0]])

					assert in_static_equilibrium(forces, location)

					import doctest

					doctest.testmod()








"""simple docstring"""




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


__magic_name__						: str    =				logging.get_logger(__name__)

__magic_name__						: List[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					 =       '''visual_bert'''




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

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




