





"""simple docstring"""





from __future__ import annotations


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		int				,		SCREAMING_SNAKE_CASE	:		int     ):







      '''simple docstring'''




      if b == 0:
            return (1, 0)
      ((lowerCAmelCase)		,						(lowerCAmelCase))    		=			extended_euclid(SCREAMING_SNAKE_CASE				,		a % b     )
      lowerCAmelCase    		=			a // b
      return (y, x - k * y)


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		int				,		SCREAMING_SNAKE_CASE	:		int				,		SCREAMING_SNAKE_CASE	:		int				,		SCREAMING_SNAKE_CASE	:		int     ):







      '''simple docstring'''




      ((lowerCAmelCase)		,						(lowerCAmelCase))    		=			extended_euclid(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     )
      lowerCAmelCase    		=			na * na
      lowerCAmelCase    		=			ra * x * na + ra * y * na
      return (n % m + m) % m


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		int				,		SCREAMING_SNAKE_CASE	:		int     ):







      '''simple docstring'''




      ((lowerCAmelCase)		,						(lowerCAmelCase))    		=			extended_euclid(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     )
      if b < 0:
            lowerCAmelCase    		=			(b % n + n) % n
      return b


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		int				,		SCREAMING_SNAKE_CASE	:		int				,		SCREAMING_SNAKE_CASE	:		int				,		SCREAMING_SNAKE_CASE	:		int     ):







      '''simple docstring'''




      lowerCAmelCase		,						lowerCAmelCase    		=			invert_modulo(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     ), invert_modulo(SCREAMING_SNAKE_CASE				,		SCREAMING_SNAKE_CASE     )
      lowerCAmelCase    		=			na * na
      lowerCAmelCase    		=			ra * x * na + ra * y * na
      return (n % m + m) % m


if __name__ == "__main__":
       from doctest import testmod

       testmod(name="chinese_remainder_theorem", verbose=True)
       testmod(name="chinese_remainder_theorem2", verbose=True)
       testmod(name="invert_modulo", verbose=True)
       testmod(name="extended_euclid", verbose=True)













"""simple docstring"""





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


SCREAMING_SNAKE_CASE__   =  logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__   =  {
    "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 						lowercase   (   _UpperCAmelCase   ):
      _SCREAMING_SNAKE_CASE							      = 'visual_bert'





      def __init__(			self ,		lowercase=30_522 ,		lowercase=768 ,		lowercase=512 ,		lowercase=12 ,		lowercase=12 ,		lowercase=3_072 ,		lowercase="gelu" ,		lowercase=0.1 ,		lowercase=0.1 ,		lowercase=512 ,		lowercase=2 ,		lowercase=0.02 ,		lowercase=1e-12 ,		lowercase=False ,		lowercase=True ,		lowercase=1 ,		lowercase=0 ,		lowercase=2 ,		**lowercase ,		)						->	int:
            super().__init__(pad_token_id=lowercase ,		bos_token_id=lowercase ,		eos_token_id=lowercase ,		**lowercase					)

            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






