






"""simple docstring"""






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


SCREAMING_SNAKE_CASE						:						List[Any]					   =       logging.get_logger(__name__)

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





class       snake_case_       (    _lowerCamelCase    ,							_lowerCamelCase       ):



	"""simple docstring"""

	SCREAMING_SNAKE_CASE_:							List[Any]   			=					"""convnextv2"""


	def __init__(      self  ,					__a=3  ,					__a=4  ,					__a=4  ,					__a=None  ,					__a=None  ,					__a="gelu"  ,					__a=0.02  ,					__a=1E-12  ,					__a=0.0  ,					__a=224  ,					__a=None  ,					__a=None  ,					**__a  ,					):


					"""simple docstring"""

					super().__init__(**__a						)

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










"""simple docstring"""






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


SCREAMING_SNAKE_CASE						:						Any					   =       logging.get_logger(__name__)





class       snake_case_       (    _lowerCamelCase       ):



	"""simple docstring"""

	SCREAMING_SNAKE_CASE_:							Union[str, Any]   			=					"""timm_backbone"""


	def __init__(      self  ,					__a=None  ,					__a=3  ,					__a=True  ,					__a=True  ,					__a=None  ,					**__a  ,					):


					"""simple docstring"""

					super().__init__(**__a						)
					A__							 =       backbone
					A__							 =       num_channels
					A__							 =       features_only
					A__							 =       use_pretrained_backbone
					A__							 =       True
					A__							 =       out_indices if out_indices is not None else (-1,)


