



import copy
from typing import Dict

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import CONFIG_MAPPING
from ..bit import BitConfig


__UpperCAmelCase						  =     logging.get_logger(__name__)

__UpperCAmelCase						  =     {
    '''google/vit-hybrid-base-bit-384''': '''https://huggingface.co/vit-hybrid-base-bit-384/resolve/main/config.json''',
    # See all ViT hybrid models at https://huggingface.co/models?filter=vit
}


class 	lowerCamelCase__ (		a__   ):
						_lowerCAmelCase								= "vit-hybrid"


						def __init__( self						:  Optional[Any]      ,       _a						:  Any=None      ,       _a						:  Union[str, Any]=7_6_8      ,       _a						:  Optional[int]=1_2      ,       _a						:  Union[str, Any]=1_2      ,       _a						:  Optional[Any]=3_0_7_2      ,       _a						:  str="gelu"      ,       _a						:  Optional[int]=0.0      ,       _a						:  Any=0.0      ,       _a						:  Tuple=0.0_2      ,       _a						:  str=1e-12      ,       _a						:  str=2_2_4      ,       _a						:  Optional[Any]=1      ,       _a						:  Optional[Any]=3      ,       _a						:  Dict=[1, 1_0_2_4, 2_4, 2_4]      ,       _a						:  str=True      ,       **_a						:  List[Any]      ,       ):
													super().__init__(**SCREAMING_SNAKE_CASE_			)

													if backbone_config is None:
																				logger.info("`backbone_config` is `None`. Initializing the config with a `BiT` backbone."			)
																				a__:       Tuple											={
																				    'global_padding': 'same',
																				    'layer_type': 'bottleneck',
																				    'depths': [3, 4, 9],
																				    'out_features': ['stage3'],
																				    'embedding_dynamic_padding': True,
																				}

													if isinstance(SCREAMING_SNAKE_CASE_      ,       SCREAMING_SNAKE_CASE_			):
																				if "model_type" in backbone_config:
																											a__:       List[Any]											=CONFIG_MAPPING[backbone_config['model_type']]
																				else:
																											logger.info(
																											    "`model_type` is not found in `backbone_config`. Use `Bit` as the backbone configuration class."			)
																											a__:       int											=BitConfig
																				a__:       str											=backbone_config_class(**SCREAMING_SNAKE_CASE_			)

													a__:       List[Any]											=backbone_featmap_shape
													a__:       Dict											=backbone_config
													a__:       List[str]											=hidden_size
													a__:       Any											=num_hidden_layers
													a__:       Tuple											=num_attention_heads
													a__:       List[str]											=intermediate_size
													a__:       Any											=hidden_act
													a__:       Optional[int]											=hidden_dropout_prob
													a__:       str											=attention_probs_dropout_prob
													a__:       Optional[Any]											=initializer_range
													a__:       Dict											=layer_norm_eps
													a__:       Union[str, Any]											=image_size
													a__:       List[Any]											=patch_size
													a__:       Optional[Any]											=num_channels
													a__:       List[str]											=qkv_bias







						def   _lowerCamelCase			( self						:  Optional[int]			):
													a__:       Tuple											=copy.deepcopy(self.__dict__			)
													a__:       Optional[int]											=self.backbone_config.to_dict()
													a__:       Any											=self.__class__.model_type
													return output











def 						__lowerCamelCase       (      __magic_name__	:  list     , __magic_name__	:  int						):
							for index, item in enumerate(__magic_name__						):
														if item == target:
																					return index
							return -1





def 						__lowerCamelCase       (      __magic_name__	:  list     , __magic_name__	:  int     , __magic_name__	:  int     , __magic_name__	:  int						):
							if not (0 <= high < len(__magic_name__						) and 0 <= low < len(__magic_name__						)):
														raise Exception("Invalid upper or lower bound!"						)
							if high < low:
														return -1
							if sequence[low] == target:
														return low
							if sequence[high] == target:
														return high
							return rec_linear_search(__magic_name__     , low + 1     , high - 1     , __magic_name__						)


if __name__ == "__main__":
		__UpperCAmelCase						  =     input('''Enter numbers separated by comma:\n''').strip()
		__UpperCAmelCase						  =     [int(item.strip()) for item in user_input.split(''',''')]

		__UpperCAmelCase						  =     int(input('''Enter a single number to be found in the list:\n''').strip())
		__UpperCAmelCase						  =     linear_search(sequence, target)
		if result != -1:
				print(f"""linear_search({sequence}, {target}) = {result}""")
		else:
				print(f"""{target} was not found in {sequence}""")





