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


UpperCamelCase_   	=	logging.get_logger(__name__)

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

class       a		(   __UpperCAmelCase      ,	__UpperCAmelCase					):
							lowercase_		:						Any   							=  'convnextv2'







							def __init__(						self  :  Any      ,				snake_case__  :  Union[str, Any]=3      ,				snake_case__  :  Tuple=4      ,				snake_case__  :  Optional[Any]=4      ,				snake_case__  :  Dict=None      ,				snake_case__  :  Tuple=None      ,				snake_case__  :  Union[str, Any]="gelu"      ,				snake_case__  :  List[Any]=0.0_2      ,				snake_case__  :  Dict=1E-12      ,				snake_case__  :  Tuple=0.0      ,				snake_case__  :  Optional[int]=224      ,				snake_case__  :  Tuple=None      ,				snake_case__  :  Optional[int]=None      ,				**snake_case__  :  Tuple      ,				):
								"""simple docstring"""







								super().__init__(**snake_case__ )

								__lowerCAmelCase         =							num_channels
								__lowerCAmelCase         =							patch_size
								__lowerCAmelCase         =							num_stages
								__lowerCAmelCase         =							[96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
								__lowerCAmelCase         =							[3, 3, 9, 3] if depths is None else depths
								__lowerCAmelCase         =							hidden_act
								__lowerCAmelCase         =							initializer_range
								__lowerCAmelCase         =							layer_norm_eps
								__lowerCAmelCase         =							drop_path_rate
								__lowerCAmelCase         =							image_size
								__lowerCAmelCase         =							["stem"] + [F"stage{idx}" for idx in range(1      ,				len(self.depths ) + 1 )]
								__lowerCAmelCase   ,						__lowerCAmelCase         =							get_aligned_output_features_output_indices(
								    out_features=snake_case__      ,				out_indices=snake_case__      ,				stage_names=self.stage_names )








from abc import ABC, abstractmethod
from argparse import ArgumentParser

class       a		(   __UpperCAmelCase					):







							@staticmethod
							@abstractmethod
							def       UpperCAmelCase__					(						snake_case__  :  ArgumentParser ):
								"""simple docstring"""







								raise NotImplementedError()







							@abstractmethod
							def       UpperCAmelCase__					(						self  :  Any ):
								"""simple docstring"""







								raise NotImplementedError()






