




'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


_SCREAMING_SNAKE_CASE			=						logging.get_logger(__name__)

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



					'''simple docstring'''





					_UpperCamelCase							=		"""swinv2"""

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



					def __init__(	self     :						List[str]      ,       _lowercase     :						int=224      ,       _lowercase     :						Dict=4      ,       _lowercase     :						str=3      ,       _lowercase     :						str=96      ,       _lowercase     :						Any=[2, 2, 6, 2]      ,       _lowercase     :						List[str]=[3, 6, 12, 24]      ,       _lowercase     :						List[str]=7      ,       _lowercase     :						Any=4.0      ,       _lowercase     :						Tuple=True      ,       _lowercase     :						Optional[int]=0.0      ,       _lowercase     :						Any=0.0      ,       _lowercase     :						int=0.1      ,       _lowercase     :						Optional[Any]="gelu"      ,       _lowercase     :						Optional[Any]=False      ,       _lowercase     :						List[str]=0.02      ,       _lowercase     :						Union[str, Any]=1E-5      ,       _lowercase     :						List[str]=32      ,       **_lowercase     :						Union[str, Any]      ,       )    ->							Union[str, Any]:
								super().__init__(**_lowercase)

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










'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


_SCREAMING_SNAKE_CASE			=						logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE			=						{"openai-gpt": "https://huggingface.co/openai-gpt/resolve/main/config.json"}
class   __UpperCAmelCase				(     lowerCAmelCase				):



					'''simple docstring'''





					_UpperCamelCase							=		"""openai-gpt"""
					_UpperCamelCase							=		{
					    """max_position_embeddings""": """n_positions""",
					    """hidden_size""": """n_embd""",
					    """num_attention_heads""": """n_head""",
					    """num_hidden_layers""": """n_layer""",
					}



					def __init__(	self     :						Any      ,       _lowercase     :						List[Any]=40_478      ,       _lowercase     :						Tuple=512      ,       _lowercase     :						Dict=768      ,       _lowercase     :						List[str]=12      ,       _lowercase     :						Optional[int]=12      ,       _lowercase     :						Tuple="gelu"      ,       _lowercase     :						int=0.1      ,       _lowercase     :						Tuple=0.1      ,       _lowercase     :						Any=0.1      ,       _lowercase     :						List[str]=1E-5      ,       _lowercase     :						str=0.02      ,       _lowercase     :						Optional[Any]="cls_index"      ,       _lowercase     :						int=True      ,       _lowercase     :						str=None      ,       _lowercase     :						Tuple=True      ,       _lowercase     :						List[Any]=0.1      ,       **_lowercase     :						int      ,       )    ->							Optional[int]:
								A_									= vocab_size
								A_									= n_positions
								A_									= n_embd
								A_									= n_layer
								A_									= n_head
								A_									= afn
								A_									= resid_pdrop
								A_									= embd_pdrop
								A_									= attn_pdrop
								A_									= layer_norm_epsilon
								A_									= initializer_range
								A_									= summary_type
								A_									= summary_use_proj
								A_									= summary_activation
								A_									= summary_first_dropout
								A_									= summary_proj_to_labels
								super().__init__(**_lowercase)




