





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


__lowercase       :str       =  logging.get_logger(__name__)

__lowercase       :List[str]       =  {
    "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    _a     (				lowercase__							):






							"""simple docstring"""

							snake_case_							 =						"visual_bert"

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

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






from __future__ import annotations

from fractions import Fraction







def       UpperCAmelCase							(     _lowerCamelCase      :  int			,   _lowerCamelCase      :  int     ):





						'''simple docstring'''


						return (
						    num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
						)







def       UpperCAmelCase							(     _lowerCamelCase      :  int     ):





						'''simple docstring'''


						SCREAMING_SNAKE_CASE__     :				int   =					[]
						SCREAMING_SNAKE_CASE__     :				str   =					11
						SCREAMING_SNAKE_CASE__     :				Any   =					int("1" + "0" * digit_len     )
						for num in range(_lowerCamelCase			,   _lowerCamelCase     ):
												while den <= 99:
																		if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
																								if is_digit_cancelling(_lowerCamelCase			,   _lowerCamelCase     ):
																														solutions.append(f"""{num}/{den}"""     )
																		den += 1
												num += 1
												SCREAMING_SNAKE_CASE__     :				str   =					10
						return solutions







def       UpperCAmelCase							(     _lowerCamelCase      :  int = 2     ):





						'''simple docstring'''


						SCREAMING_SNAKE_CASE__     :				Optional[int]   =					1.0
						for fraction in fraction_list(_lowerCamelCase     ):
												SCREAMING_SNAKE_CASE__     :				Any   =					Fraction(_lowerCamelCase     )
												result *= frac.denominator / frac.numerator
						return int(_lowerCamelCase     )


if __name__ == "__main__":
				print(solution())