
"""simple docstring"""



from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

UpperCamelCase__          =	typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
UpperCamelCase__          =	typing.Union[np.floataa, int, float]  # noqa: UP007
def 					lowerCamelCase   (     _snake_case    ,_snake_case ):
    return np.sqrt(np.sum((np.asarray(_snake_case ) - np.asarray(_snake_case )) ** 2 ) )
def 					lowerCamelCase   (     _snake_case    ,_snake_case ):
    return sum((va - va) ** 2 for va, va in zip(_snake_case    ,_snake_case ) ) ** (1 / 2)


if __name__ == "__main__":
    def 					lowerCamelCase   (     ):
        from timeit import timeit

        print('Without Numpy' )
        print(
            timeit(
                'euclidean_distance_no_np([1, 2, 3], [4, 5, 6])'    ,number=10000    ,globals=globals()    ,) )
        print('With Numpy' )
        print(
            timeit(
                'euclidean_distance([1, 2, 3], [4, 5, 6])'    ,number=10000    ,globals=globals()    ,) )

    benchmark()








"""simple docstring"""


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


__magic_name__       :					Any						=			logging.get_logger(__name__)

__magic_name__       :					int						=			{
    """facebook/convnextv2-tiny-1k-224""": """https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json""",
}






class 							lowercase__			(   __SCREAMING_SNAKE_CASE					,     __SCREAMING_SNAKE_CASE	):

			"""simple docstring"""
			__lowerCAmelCase     :				str										=  """convnextv2"""







			def __init__(      self						,   _A=3						,   _A=4						,   _A=4						,   _A=None						,   _A=None						,   _A="gelu"						,   _A=0.02						,   _A=1e-1_2						,   _A=0.0						,   _A=2_2_4						,   _A=None						,   _A=None						,   **_A						,   ):






									'''simple docstring'''







									super().__init__(**_A    )

									UpperCamelCase				:		Optional[Any]				   =			num_channels
									UpperCamelCase				:		int				   =			patch_size
									UpperCamelCase				:		Dict				   =			num_stages
									UpperCamelCase				:		Tuple				   =			[9_6, 1_9_2, 3_8_4, 7_6_8] if hidden_sizes is None else hidden_sizes
									UpperCamelCase				:		str				   =			[3, 3, 9, 3] if depths is None else depths
									UpperCamelCase				:		List[str]				   =			hidden_act
									UpperCamelCase				:		List[str]				   =			initializer_range
									UpperCamelCase				:		List[Any]				   =			layer_norm_eps
									UpperCamelCase				:		Any				   =			drop_path_rate
									UpperCamelCase				:		Any				   =			image_size
									UpperCamelCase				:		Union[str, Any]				   =			["""stem"""] + [f"""stage{idx}""" for idx in range(1						,   len(self.depths    ) + 1    )]
									UpperCamelCase   ,						UpperCamelCase				:		Optional[int]				   =			get_aligned_output_features_output_indices(
									    out_features=_A						,   out_indices=_A						,   stage_names=self.stage_names    )



