




"""simple docstring"""







from __future__ import annotations

# This is the precision for this function which can be altered.
# It is recommended for users to keep this number greater than or equal to 10.
__A   :  List[Any]					=      1_0

def 						snake_case__       (					_lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase				)			->int:






		"""simple docstring"""


		for i in range(_lowerCamelCase,  _lowerCamelCase				):
				if array[i] == target:
						return i
		return -1

def 						snake_case__       (					_lowerCamelCase,  _lowerCamelCase				)			->int:






		"""simple docstring"""


		__lowercase				:		Optional[Any]												=				0
		__lowercase				:		Any												=				len(_lowerCamelCase				)
		while left <= right:
				if right - left < precision:
						return lin_search(_lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase				)

				__lowercase				:		Tuple												=				(left + right) // 3 + 1
				__lowercase				:		List[Any]												=				2 * (left + right) // 3 + 1

				if array[one_third] == target:
						return one_third
				elif array[two_third] == target:
						return two_third

				elif target < array[one_third]:
						__lowercase				:		Dict												=				one_third - 1
				elif array[two_third] < target:
						__lowercase				:		Dict												=				two_third + 1

				else:
						__lowercase				:		List[str]												=				one_third + 1
						__lowercase				:		Optional[Any]												=				two_third - 1
		else:
				return -1

def 						snake_case__       (					_lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase				)			->int:






		"""simple docstring"""


		if left < right:
				if right - left < precision:
						return lin_search(_lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase				)
				__lowercase				:		Tuple												=				(left + right) // 3 + 1
				__lowercase				:		Optional[Any]												=				2 * (left + right) // 3 + 1

				if array[one_third] == target:
						return one_third
				elif array[two_third] == target:
						return two_third

				elif target < array[one_third]:
						return rec_ternary_search(_lowerCamelCase,  one_third - 1,  _lowerCamelCase,  _lowerCamelCase				)
				elif array[two_third] < target:
						return rec_ternary_search(two_third + 1,  _lowerCamelCase,  _lowerCamelCase,  _lowerCamelCase				)
				else:
						return rec_ternary_search(one_third + 1,  two_third - 1,  _lowerCamelCase,  _lowerCamelCase				)
		else:
				return -1


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						__A   :  str					=      input('Enter numbers separated by comma:\n').strip()
						__A   :  Optional[int]					=      [int(item.strip()) for item in user_input.split(',')]
						assert collection == sorted(collection), F"List must be ordered.\n{collection}."
						__A   :  Tuple					=      int(input('Enter the number to be found in the list:\n').strip())
						__A   :  Any					=      ite_ternary_search(collection, target)
						__A   :  List[str]					=      rec_ternary_search(0, len(collection) - 1, collection, target)
						if resulta != -1:
												print(F"""Iterative search: {target} found at positions: {resulta}""")
												print(F"""Recursive search: {target} found at positions: {resulta}""")
						else:
												print('Not found')






"""simple docstring"""







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


__A   :  str					=      logging.get_logger(__name__)

__A   :  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       lowerCAmelCase__       (			lowerCAmelCase_    ):


				"""simple docstring"""





				__UpperCAmelCase :     Tuple       =      "visual_bert"



				def __init__(     self					:	List[Any]    ,   lowercase__					:	Dict=3_0_5_2_2    ,   lowercase__					:	Any=7_6_8    ,   lowercase__					:	Dict=5_1_2    ,   lowercase__					:	Tuple=1_2    ,   lowercase__					:	Any=1_2    ,   lowercase__					:	Union[str, Any]=3_0_7_2    ,   lowercase__					:	Tuple="gelu"    ,   lowercase__					:	Dict=0.1    ,   lowercase__					:	Tuple=0.1    ,   lowercase__					:	str=5_1_2    ,   lowercase__					:	str=2    ,   lowercase__					:	Any=0.0_2    ,   lowercase__					:	Any=1e-12    ,   lowercase__					:	Any=False    ,   lowercase__					:	List[str]=True    ,   lowercase__					:	Dict=1    ,   lowercase__					:	List[Any]=0    ,   lowercase__					:	Tuple=2    ,   **lowercase__					:	Any    ,   ):
						super().__init__(pad_token_id=lowercase__    ,   bos_token_id=lowercase__    ,   eos_token_id=lowercase__    ,   **lowercase__						)

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