"""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			   = 1_0



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase )  ->  int:
   for i in range(__UpperCAmelCase       ,    __UpperCAmelCase ):
      if array[i] == target:
         return i
   return -1



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase       ,    __UpperCAmelCase )  ->  int:
   lowercase__:   Any					=      0
   lowercase__:   Dict					=      len(__UpperCAmelCase )
   while left <= right:
      if right - left < precision:
         return lin_search(__UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase )

      lowercase__:   List[str]					=      (left + right) // 3 + 1
      lowercase__:   int					=      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__:   str					=      one_third - 1
      elif array[two_third] < target:
         lowercase__:   Tuple					=      two_third + 1

      else:
         lowercase__:   Any					=      one_third + 1
         lowercase__:   Dict					=      two_third - 1
   else:
      return -1



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase )  ->  int:
   if left < right:
      if right - left < precision:
         return lin_search(__UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase )
      lowercase__:   str					=      (left + right) // 3 + 1
      lowercase__:   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(__UpperCAmelCase       ,    one_third - 1       ,    __UpperCAmelCase       ,    __UpperCAmelCase )
      elif array[two_third] < target:
         return rec_ternary_search(two_third + 1       ,    __UpperCAmelCase       ,    __UpperCAmelCase       ,    __UpperCAmelCase )
      else:
         return rec_ternary_search(one_third + 1       ,    two_third - 1       ,    __UpperCAmelCase       ,    __UpperCAmelCase )
   else:
      return -1


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       __A			   = input("Enter numbers separated by comma:\n").strip()
       __A			   = [int(item.strip()) for item in user_input.split(",")]
       assert collection == sorted(collection), f"List must be ordered.\n{collection}."
       __A			   = int(input("Enter the number to be found in the list:\n").strip())
       __A			   = ite_ternary_search(collection, target)
       __A			   = 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 typing import List

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


__A			   = logging.get_logger(__name__)

__A			   = {
    "snap-research/efficientformer-l1-300": (
        "https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json"
    ),
}


class     UpperCAmelCase						(_UpperCAmelCase  ):



    """simple docstring"""

    _UpperCAmelCase	:Optional[Any]						    = "efficientformer"






    def __init__(   self    ,			_UpperCAmelCase = [3, 2, 6, 4]    ,			_UpperCAmelCase = [48, 96, 224, 448]    ,			_UpperCAmelCase = [True, True, True, True]    ,			_UpperCAmelCase = 448    ,			_UpperCAmelCase = 32    ,			_UpperCAmelCase = 4    ,			_UpperCAmelCase = 7    ,			_UpperCAmelCase = 5    ,			_UpperCAmelCase = 8    ,			_UpperCAmelCase = 4    ,			_UpperCAmelCase = 0.0    ,			_UpperCAmelCase = 16    ,			_UpperCAmelCase = 3    ,			_UpperCAmelCase = 3    ,			_UpperCAmelCase = 3    ,			_UpperCAmelCase = 2    ,			_UpperCAmelCase = 1    ,			_UpperCAmelCase = 0.0    ,			_UpperCAmelCase = 1    ,			_UpperCAmelCase = True    ,			_UpperCAmelCase = True    ,			_UpperCAmelCase = 1e-5    ,			_UpperCAmelCase = "gelu"    ,			_UpperCAmelCase = 0.02    ,			_UpperCAmelCase = 1e-1_2    ,			_UpperCAmelCase = 224    ,			_UpperCAmelCase = 1e-0_5    ,			**_UpperCAmelCase    ,			):
       super().__init__(**_UpperCAmelCase							)

       lowercase__:   List[str]					=      hidden_act
       lowercase__:   Union[str, Any]					=      hidden_dropout_prob
       lowercase__:   Union[str, Any]					=      hidden_sizes
       lowercase__:   Any					=      num_hidden_layers
       lowercase__:   int					=      num_attention_heads
       lowercase__:   Dict					=      initializer_range
       lowercase__:   Optional[int]					=      layer_norm_eps
       lowercase__:   int					=      patch_size
       lowercase__:   int					=      num_channels
       lowercase__:   str					=      depths
       lowercase__:   List[str]					=      mlp_expansion_ratio
       lowercase__:   List[str]					=      downsamples
       lowercase__:   List[str]					=      dim
       lowercase__:   Optional[Any]					=      key_dim
       lowercase__:   Union[str, Any]					=      attention_ratio
       lowercase__:   Any					=      resolution
       lowercase__:   Any					=      pool_size
       lowercase__:   List[Any]					=      downsample_patch_size
       lowercase__:   Optional[int]					=      downsample_stride
       lowercase__:   Union[str, Any]					=      downsample_pad
       lowercase__:   List[Any]					=      drop_path_rate
       lowercase__:   Optional[Any]					=      num_metaad_blocks
       lowercase__:   Any					=      distillation
       lowercase__:   Optional[int]					=      use_layer_scale
       lowercase__:   List[str]					=      layer_scale_init_value
       lowercase__:   Dict					=      image_size
       lowercase__:   List[str]					=      batch_norm_eps
