





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


_a 						=      logging.get_logger(__name__)

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






class 					__A    (    lowerCAmelCase ):

			'''simple docstring'''







			lowerCAmelCase_							     =						"""swinv2"""

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





			def __init__(    self       ,  __lowerCAmelCase=2_2_4       ,  __lowerCAmelCase=4       ,  __lowerCAmelCase=3       ,  __lowerCAmelCase=9_6       ,  __lowerCAmelCase=[2, 2, 6, 2]       ,  __lowerCAmelCase=[3, 6, 1_2, 2_4]       ,  __lowerCAmelCase=7       ,  __lowerCAmelCase=4.0       ,  __lowerCAmelCase=True       ,  __lowerCAmelCase=0.0       ,  __lowerCAmelCase=0.0       ,  __lowerCAmelCase=0.1       ,  __lowerCAmelCase="gelu"       ,  __lowerCAmelCase=False       ,  __lowerCAmelCase=0.02       ,  __lowerCAmelCase=1E-5       ,  __lowerCAmelCase=3_2       ,  **__lowerCAmelCase       ,  ):



				'''simple docstring'''







				super().__init__(**__lowerCAmelCase							)

				lowerCamelCase__								=		image_size
				lowerCamelCase__								=		patch_size
				lowerCamelCase__								=		num_channels
				lowerCamelCase__								=		embed_dim
				lowerCamelCase__								=		depths
				lowerCamelCase__								=		len(__lowerCAmelCase							)
				lowerCamelCase__								=		num_heads
				lowerCamelCase__								=		window_size
				lowerCamelCase__								=		mlp_ratio
				lowerCamelCase__								=		qkv_bias
				lowerCamelCase__								=		hidden_dropout_prob
				lowerCamelCase__								=		attention_probs_dropout_prob
				lowerCamelCase__								=		drop_path_rate
				lowerCamelCase__								=		hidden_act
				lowerCamelCase__								=		use_absolute_embeddings
				lowerCamelCase__								=		layer_norm_eps
				lowerCamelCase__								=		initializer_range
				lowerCamelCase__								=		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
				lowerCamelCase__								=		int(embed_dim * 2 ** (len(__lowerCAmelCase							) - 1)							)
				lowerCamelCase__								=		(0, 0, 0, 0)










def lowerCAmelCase__(__snake_case       ,__snake_case							)				->      float:







	'''simple docstring'''







	if mass < 0:
		raise ValueError('''The mass of a body cannot be negative'''							)
	return 0.5 * mass * abs(__snake_case							) * abs(__snake_case							)


if __name__ == "__main__":
			import doctest

			doctest.testmod(verbose=True)



