





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


lowerCAmelCase_    =    logging.get_logger(__name__)

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



class  __lowerCAmelCase	(      _a,					_a					):
			lowerCamelCase_					:					Dict	      =				'''convnextv2'''






			def __init__(self ,							__magic_name__=3 ,							__magic_name__=4 ,							__magic_name__=4 ,							__magic_name__=None ,							__magic_name__=None ,							__magic_name__="gelu" ,							__magic_name__=0.02 ,							__magic_name__=1e-12 ,							__magic_name__=0.0 ,							__magic_name__=224 ,							__magic_name__=None ,							__magic_name__=None ,							**__magic_name__ ,							)					->       List[str]:


							'''simple docstring'''



							super().__init__(**__magic_name__   )

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







def 					lowerCamelCase_						(    _UpperCamelCase			)		->						str:






				"""simple docstring"""


				if number > 0:
								raise ValueError('''input must be a negative integer'''			)
				snake_case_						:   List[str]           =  len(bin(_UpperCamelCase			)[3:]			)
				snake_case_						:   str           =  bin(abs(_UpperCamelCase			) - (1 << binary_number_length)			)[3:]
				snake_case_						:   Dict           =  (
				    (
				        '''1'''
				        + '''0''' * (binary_number_length - len(_UpperCamelCase			))
				        + twos_complement_number
				    )
				    if number < 0
				    else '''0'''
				)
				return "0b" + twos_complement_number


if __name__ == "__main__":
	import doctest

	doctest.testmod()
