





'''simple docstring'''







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


snake_case_     :       Tuple						=  logging.get_logger(__name__)

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


class 					__a      (lowerCamelCase       ,		lowerCamelCase     ):
							__a					:   List[str]									=       "convnextv2"

							def __init__(							self							:     List[str]       ,     __magic_name__							:     List[Any]=3       ,     __magic_name__							:     Tuple=4       ,     __magic_name__							:     Union[str, Any]=4       ,     __magic_name__							:     Tuple=None       ,     __magic_name__							:     List[str]=None       ,     __magic_name__							:     Optional[Any]="gelu"       ,     __magic_name__							:     List[Any]=0.0_2       ,     __magic_name__							:     Optional[int]=1E-12       ,     __magic_name__							:     int=0.0       ,     __magic_name__							:     int=2_24       ,     __magic_name__							:     str=None       ,     __magic_name__							:     Any=None       ,     **__magic_name__							:     Optional[Any]       ,     )					->       Union[str, Any]:







													"""simple docstring"""
													super().__init__(**__magic_name__   )

													UpperCAmelCase_			:      List[Any]     						=  num_channels
													UpperCAmelCase_			:      Any     						=  patch_size
													UpperCAmelCase_			:      List[Any]     						=  num_stages
													UpperCAmelCase_			:      Dict     						=  [96, 1_92, 3_84, 7_68] if hidden_sizes is None else hidden_sizes
													UpperCAmelCase_			:      str     						=  [3, 3, 9, 3] if depths is None else depths
													UpperCAmelCase_			:      Optional[int]     						=  hidden_act
													UpperCAmelCase_			:      Tuple     						=  initializer_range
													UpperCAmelCase_			:      Optional[int]     						=  layer_norm_eps
													UpperCAmelCase_			:      Any     						=  drop_path_rate
													UpperCAmelCase_			:      Optional[int]     						=  image_size
													UpperCAmelCase_			:      Optional[int]     						=  ['''stem'''] + [F"""stage{idx}""" for idx in range(1       ,     len(self.depths   ) + 1   )]
													UpperCAmelCase_						,       UpperCAmelCase_			:      List[str]     						=  get_aligned_output_features_output_indices(
													    out_features=__magic_name__       ,     out_indices=__magic_name__       ,     stage_names=self.stage_names   )












'''simple docstring'''







def        lowerCamelCase_      (  SCREAMING_SNAKE_CASE__      :			int   ) ->	str:
						if number > 0:
												raise ValueError('''input must be a negative integer'''   )
						UpperCAmelCase_			:      Union[str, Any]     						=  len(bin(SCREAMING_SNAKE_CASE__   )[3:]   )
						UpperCAmelCase_			:      Union[str, Any]     						=  bin(abs(SCREAMING_SNAKE_CASE__   ) - (1 << binary_number_length)   )[3:]
						UpperCAmelCase_			:      Optional[Any]     						=  (
						    (
						        '''1'''
						        + '''0''' * (binary_number_length - len(SCREAMING_SNAKE_CASE__   ))
						        + twos_complement_number
						    )
						    if number < 0
						    else '''0'''
						)
						return "0b" + twos_complement_number


if __name__ == "__main__":
					import doctest

					doctest.testmod()





