





"""simple docstring"""


def      UpperCamelCase							(SCREAMING_SNAKE_CASE     ):
						if num < 0:
												return False

						UpperCamelCase				:		int				   =			num
						UpperCamelCase				:		int				   =			0
						while num > 0:
												UpperCamelCase				:		Optional[Any]				   =			rev_num * 10 + (num % 10)
												num //= 10

						return num_copy == rev_num


if __name__ == "__main__":
		import doctest

		doctest.testmod()










"""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    )



