


from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


__lowerCAmelCase		       =							logging.get_logger(__name__)

__lowerCAmelCase		       =							{
    '''shi-labs/dinat-mini-in1k-224''': '''https://huggingface.co/shi-labs/dinat-mini-in1k-224/resolve/main/config.json''',
    # See all Dinat models at https://huggingface.co/models?filter=dinat
}





class   __a			(    __UpperCamelCase       ,       __UpperCamelCase      ):
 __lowercase :							Union[str, Any]        = 'dinat'

 __lowercase :							List[Any]        = {
     'num_attention_heads': 'num_heads',
     'num_hidden_layers': 'num_layers',
 }
 def __init__(   self				, lowerCAmelCase__=4				, lowerCAmelCase__=3				, lowerCAmelCase__=64				, lowerCAmelCase__=[3, 4, 6, 5]				, lowerCAmelCase__=[2, 4, 8, 16]				, lowerCAmelCase__=7				, lowerCAmelCase__=[[1, 8, 1], [1, 4, 1, 4], [1, 2, 1, 2, 1, 2], [1, 1, 1, 1, 1]]				, lowerCAmelCase__=3.0				, lowerCAmelCase__=True				, lowerCAmelCase__=0.0				, lowerCAmelCase__=0.0				, lowerCAmelCase__=0.1				, lowerCAmelCase__="gelu"				, lowerCAmelCase__=0.0_2				, lowerCAmelCase__=1E-5				, lowerCAmelCase__=0.0				, lowerCAmelCase__=None				, lowerCAmelCase__=None				, **lowerCAmelCase__				, )					->				Optional[Any]:




        '''simple docstring'''
        super().__init__(**lowerCAmelCase__ )

        lowercase__:   Optional[int]  			=   patch_size
        lowercase__:   List[str]  			=   num_channels
        lowercase__:   Dict  			=   embed_dim
        lowercase__:   str  			=   depths
        lowercase__:   Optional[Any]  			=   len(lowerCAmelCase__ )
        lowercase__:   Any  			=   num_heads
        lowercase__:   Optional[Any]  			=   kernel_size
        lowercase__:   str  			=   dilations
        lowercase__:   Optional[Any]  			=   mlp_ratio
        lowercase__:   Tuple  			=   qkv_bias
        lowercase__:   Tuple  			=   hidden_dropout_prob
        lowercase__:   Union[str, Any]  			=   attention_probs_dropout_prob
        lowercase__:   Any  			=   drop_path_rate
        lowercase__:   Optional[int]  			=   hidden_act
        lowercase__:   Union[str, Any]  			=   layer_norm_eps
        lowercase__:   List[Any]  			=   initializer_range
        # we set the hidden_size attribute in order to make Dinat work with VisionEncoderDecoderModel
        # this indicates the channel dimension after the last stage of the model
        lowercase__:   Union[str, Any]  			=   int(embed_dim * 2 ** (len(lowerCAmelCase__ ) - 1) )
        lowercase__:   Optional[Any]  			=   layer_scale_init_value
        lowercase__:   Dict  			=   ['stem'] + [F'stage{idx}' for idx in range(1				, len(lowerCAmelCase__ ) + 1 )]
        lowercase__			,						lowercase__:   Tuple  			=   get_aligned_output_features_output_indices(
            out_features=lowerCAmelCase__				, out_indices=lowerCAmelCase__				, stage_names=self.stage_names )






from __future__ import annotations




def    snake_case_     (  snake_case			,							snake_case     )  ->				bool:
       if len(snake_case     ) == 0:
              return False
       lowercase__:   Any  			=   len(snake_case     ) // 2
       if a_list[midpoint] == item:
              return True
       if item < a_list[midpoint]:
              return binary_search(a_list[:midpoint]			,							snake_case     )
       else:
              return binary_search(a_list[midpoint + 1 :]			,							snake_case     )


if __name__ == "__main__":
 __lowerCAmelCase		       =							input('''Enter numbers separated by comma:\n''').strip()
 __lowerCAmelCase		       =							[int(item.strip()) for item in user_input.split(''',''')]
 __lowerCAmelCase		       =							int(input('''Enter the number to be found in the list:\n''').strip())
 __lowerCAmelCase		       =							'''''' if binary_search(sequence, target) else '''not '''
 print(F'''{target} was {not_str}found in {sequence}''')


