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     lowerCAmelCase__     (				SCREAMING_SNAKE_CASE_			):


		'''simple docstring'''






		lowerCAmelCase_     =   'swinv2'

		lowerCAmelCase_     =   {
		    'num_attention_heads': 'num_heads',
		    'num_hidden_layers': 'num_layers',
		}
		def __init__(       self     :     List[Any]     ,  snake_case__     :     List[str]=2_2_4     ,  snake_case__     :     Union[str, Any]=4     ,  snake_case__     :     Any=3     ,  snake_case__     :     Optional[int]=9_6     ,  snake_case__     :     Dict=[2, 2, 6, 2]     ,  snake_case__     :     int=[3, 6, 1_2, 2_4]     ,  snake_case__     :     str=7     ,  snake_case__     :     Any=4.0     ,  snake_case__     :     Union[str, Any]=True     ,  snake_case__     :     Any=0.0     ,  snake_case__     :     str=0.0     ,  snake_case__     :     Optional[int]=0.1     ,  snake_case__     :     Optional[int]="gelu"     ,  snake_case__     :     int=False     ,  snake_case__     :     Tuple=0.02     ,  snake_case__     :     Dict=1e-5     ,  snake_case__     :     Tuple=3_2     ,  **snake_case__     :     List[str]     ,  )      ->	Any:
				super().__init__(**snake_case__		)

				_lowerCamelCase				   =  image_size
				_lowerCamelCase				   =  patch_size
				_lowerCamelCase				   =  num_channels
				_lowerCamelCase				   =  embed_dim
				_lowerCamelCase				   =  depths
				_lowerCamelCase				   =  len(snake_case__		)
				_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(snake_case__		) - 1)		)
				_lowerCamelCase				   =  (0, 0, 0, 0)
from abc import ABC, abstractmethod
from argparse import ArgumentParser





class     lowerCAmelCase__     (				SCREAMING_SNAKE_CASE_			):


		'''simple docstring'''






		@staticmethod
		@abstractmethod
		def   _snake_case       (       snake_case__     :     ArgumentParser		)      ->	Tuple:
				raise NotImplementedError()



		@abstractmethod
		def   _snake_case       (       self     :     Optional[Any]		)      ->	Optional[Any]:
				raise NotImplementedError()