
"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


_a      :			Optional[int]					=							logging.get_logger(__name__)

_a      :			List[str]					=							{
    """facebook/convnextv2-tiny-1k-224""": """https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json""",
}






class      _UpperCAmelCase				(					_snake_case		,					_snake_case):
				__lowercase							: List[Any]  =					"""convnextv2"""
				def __init__(    self						,    snake_case_=3						,    snake_case_=4						,    snake_case_=4						,    snake_case_=None						,    snake_case_=None						,    snake_case_="gelu"						,    snake_case_=0.02						,    snake_case_=1E-12						,    snake_case_=0.0						,    snake_case_=2_24						,    snake_case_=None						,    snake_case_=None						,    **snake_case_						,    ):
						super().__init__(**snake_case_     )

						_snake_case     :						Tuple						=   num_channels
						_snake_case     :						Optional[int]						=   patch_size
						_snake_case     :						Tuple						=   num_stages
						_snake_case     :						int						=   [96, 1_92, 3_84, 7_68] if hidden_sizes is None else hidden_sizes
						_snake_case     :						str						=   [3, 3, 9, 3] if depths is None else depths
						_snake_case     :						int						=   hidden_act
						_snake_case     :						Tuple						=   initializer_range
						_snake_case     :						Union[str, Any]						=   layer_norm_eps
						_snake_case     :						Optional[int]						=   drop_path_rate
						_snake_case     :						Union[str, Any]						=   image_size
						_snake_case     :						List[Any]						=   ["stem"] + [F'stage{idx}' for idx in range(1						,    len(self.depths     ) + 1     )]
						_snake_case     :						Dict						=   get_aligned_output_features_output_indices(
						    out_features=snake_case_						,    out_indices=snake_case_						,    stage_names=self.stage_names     )



"""simple docstring"""
def 				a__   (   a   :				list       ,     a   :				int       ,     a   :				int = 0       ,     a   :				int = 0		):

  """simple docstring"""







  _snake_case     :						Optional[int]						=   right or len(a		) - 1
  if left > right:
    return -1
  elif list_data[left] == key:
    return left
  elif list_data[right] == key:
    return right
  else:
    return search(a       ,     a       ,     left + 1       ,     right - 1		)


if __name__ == "__main__":
    import doctest

    doctest.testmod()

