




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


lowercase__							:	List[str]											=		logging.get_logger(__name__)

lowercase__							:	Optional[Any]											=		{
    "facebook/convnextv2-tiny-1k-224": "https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json",
}
class 						UpperCAmelCase  (							UpperCAmelCase__			,  UpperCAmelCase__     ):







						'''simple docstring'''





						lowerCAmelCase_							=  '''convnextv2'''






						def __init__(		self				:	List[str]			,      __lowercase				:	Dict=3			,      __lowercase				:	str=4			,      __lowercase				:	Optional[Any]=4			,      __lowercase				:	Optional[int]=None			,      __lowercase				:	Any=None			,      __lowercase				:	Optional[Any]="gelu"			,      __lowercase				:	Dict=0.02			,      __lowercase				:	List[Any]=1E-12			,      __lowercase				:	Dict=0.0			,      __lowercase				:	Optional[int]=2_24			,      __lowercase				:	Optional[int]=None			,      __lowercase				:	Dict=None			,      **__lowercase				:	Dict			,      ):






							"""simple docstring"""






							super().__init__(**__lowercase		)

							snake_case_						       =	num_channels
							snake_case_						       =	patch_size
							snake_case_						       =	num_stages
							snake_case_						       =	[96, 1_92, 3_84, 7_68] if hidden_sizes is None else hidden_sizes
							snake_case_						       =	[3, 3, 9, 3] if depths is None else depths
							snake_case_						       =	hidden_act
							snake_case_						       =	initializer_range
							snake_case_						       =	layer_norm_eps
							snake_case_						       =	drop_path_rate
							snake_case_						       =	image_size
							snake_case_						       =	["stem"] + [f"stage{idx}" for idx in range(1			,      len(self.depths		) + 1		)]
							snake_case_       , snake_case_						       =	get_aligned_output_features_output_indices(
							    out_features=__lowercase			,      out_indices=__lowercase			,      stage_names=self.stage_names		)






import numpy as np


def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	return (2 / (1 + np.exp(-2 * vector				))) - 1


if __name__ == "__main__":
		import doctest

		doctest.testmod()
