



'''simple docstring'''



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


lowerCamelCase	 =       logging.get_logger(__name__)

lowerCamelCase	 =       {
    """microsoft/swinv2-tiny-patch4-window8-256""": (
        """https://huggingface.co/microsoft/swinv2-tiny-patch4-window8-256/resolve/main/config.json"""
    ),
}





class _UpperCamelCase		(     A		):





				'''simple docstring'''





				lowerCAmelCase__					    =    """swinv2"""

				lowerCAmelCase__					    =    {
				    """num_attention_heads""": """num_heads""",
				    """num_hidden_layers""": """num_layers""",
				}

				def __init__(							self  :  str  ,       _lowerCAmelCase  :  int=2_2_4  ,       _lowerCAmelCase  :  str=4  ,       _lowerCAmelCase  :  int=3  ,       _lowerCAmelCase  :  Optional[Any]=9_6  ,       _lowerCAmelCase  :  str=[2, 2, 6, 2]  ,       _lowerCAmelCase  :  Dict=[3, 6, 1_2, 2_4]  ,       _lowerCAmelCase  :  Any=7  ,       _lowerCAmelCase  :  Optional[int]=4.0  ,       _lowerCAmelCase  :  Optional[Any]=True  ,       _lowerCAmelCase  :  Any=0.0  ,       _lowerCAmelCase  :  Union[str, Any]=0.0  ,       _lowerCAmelCase  :  Any=0.1  ,       _lowerCAmelCase  :  Tuple="gelu"  ,       _lowerCAmelCase  :  Union[str, Any]=False  ,       _lowerCAmelCase  :  Optional[int]=0.02  ,       _lowerCAmelCase  :  Any=1e-5  ,       _lowerCAmelCase  :  Tuple=3_2  ,       **_lowerCAmelCase  :  Any  ,       ):







											'''simple docstring'''

											super().__init__(**_lowerCAmelCase)

											__lowercase       	=image_size
											__lowercase       	=patch_size
											__lowercase       	=num_channels
											__lowercase       	=embed_dim
											__lowercase       	=depths
											__lowercase       	=len(_lowerCAmelCase)
											__lowercase       	=num_heads
											__lowercase       	=window_size
											__lowercase       	=mlp_ratio
											__lowercase       	=qkv_bias
											__lowercase       	=hidden_dropout_prob
											__lowercase       	=attention_probs_dropout_prob
											__lowercase       	=drop_path_rate
											__lowercase       	=hidden_act
											__lowercase       	=use_absolute_embeddings
											__lowercase       	=layer_norm_eps
											__lowercase       	=initializer_range
											__lowercase       	=encoder_stride
											# we set the hidden_size attribute in order to make Swinv2 work with VisionEncoderDecoderModel
											# this indicates the channel dimension after the last stage of the model
											__lowercase       	=int(embed_dim * 2 ** (len(_lowerCAmelCase) - 1))
											__lowercase       	=(0, 0, 0, 0)








'''simple docstring'''



def   _A       (   _lowerCAmelCase					):



							"""simple docstring"""



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


if __name__ == "__main__":
		import doctest

		doctest.testmod()



