





'''simple docstring'''






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


A_		:  Union[str, Any]		 =						logging.get_logger(__name__)

A_		:  List[Any]		 =						{
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}
class 					__snake_case  (					__SCREAMING_SNAKE_CASE							):






   '''simple docstring'''





   lowerCamelCase__    							=      """megatron-bert"""

   def __init__(							self	,		__SCREAMING_SNAKE_CASE=2_9_0_5_6	,		__SCREAMING_SNAKE_CASE=1_0_2_4	,		__SCREAMING_SNAKE_CASE=2_4	,		__SCREAMING_SNAKE_CASE=1_6	,		__SCREAMING_SNAKE_CASE=4_0_9_6	,		__SCREAMING_SNAKE_CASE="gelu"	,		__SCREAMING_SNAKE_CASE=0.1	,		__SCREAMING_SNAKE_CASE=0.1	,		__SCREAMING_SNAKE_CASE=5_1_2	,		__SCREAMING_SNAKE_CASE=2	,		__SCREAMING_SNAKE_CASE=0.02	,		__SCREAMING_SNAKE_CASE=1e-1_2	,		__SCREAMING_SNAKE_CASE=0	,		__SCREAMING_SNAKE_CASE="absolute"	,		__SCREAMING_SNAKE_CASE=True	,		**__SCREAMING_SNAKE_CASE	,		):
    super().__init__(pad_token_id=_A	,		**_A       )

    snake_case__     :					int    =  vocab_size
    snake_case__     :					int    =  hidden_size
    snake_case__     :					Tuple    =  num_hidden_layers
    snake_case__     :					Tuple    =  num_attention_heads
    snake_case__     :					Any    =  hidden_act
    snake_case__     :					Dict    =  intermediate_size
    snake_case__     :					Union[str, Any]    =  hidden_dropout_prob
    snake_case__     :					List[Any]    =  attention_probs_dropout_prob
    snake_case__     :					Union[str, Any]    =  max_position_embeddings
    snake_case__     :					int    =  type_vocab_size
    snake_case__     :					List[Any]    =  initializer_range
    snake_case__     :					Union[str, Any]    =  layer_norm_eps
    snake_case__     :					Optional[int]    =  position_embedding_type
    snake_case__     :					int    =  use_cache











"""simple docstring"""


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


__magic_name__       :					Dict						=			logging.get_logger(__name__)

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






class 							lowercase__			(   __SCREAMING_SNAKE_CASE	):

			"""simple docstring"""
			__lowerCAmelCase     :				List[str]										=  """swinv2"""

			__lowerCAmelCase     :				Optional[Any]										=  {
			    """num_attention_heads""": """num_heads""",
			    """num_hidden_layers""": """num_layers""",
			}







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






									'''simple docstring'''







									super().__init__(**_A    )

									UpperCamelCase				:		Optional[Any]				   =			image_size
									UpperCamelCase				:		Tuple				   =			patch_size
									UpperCamelCase				:		str				   =			num_channels
									UpperCamelCase				:		Dict				   =			embed_dim
									UpperCamelCase				:		List[str]				   =			depths
									UpperCamelCase				:		Optional[Any]				   =			len(_A    )
									UpperCamelCase				:		Optional[int]				   =			num_heads
									UpperCamelCase				:		Optional[int]				   =			window_size
									UpperCamelCase				:		List[Any]				   =			mlp_ratio
									UpperCamelCase				:		str				   =			qkv_bias
									UpperCamelCase				:		str				   =			hidden_dropout_prob
									UpperCamelCase				:		Tuple				   =			attention_probs_dropout_prob
									UpperCamelCase				:		List[Any]				   =			drop_path_rate
									UpperCamelCase				:		str				   =			hidden_act
									UpperCamelCase				:		Optional[Any]				   =			use_absolute_embeddings
									UpperCamelCase				:		Dict				   =			layer_norm_eps
									UpperCamelCase				:		Dict				   =			initializer_range
									UpperCamelCase				:		str				   =			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
									UpperCamelCase				:		Any				   =			int(embed_dim * 2 ** (len(_A    ) - 1)    )
									UpperCamelCase				:		str				   =			(0, 0, 0, 0)



