
'''simple docstring'''

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


snake_case									=    logging.get_logger(__name__)

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




class    lowerCAmelCase       (     UpperCamelCase_  ):
 A_				:				Dict	=			"""swinv2"""

 A_				:				Dict	=			{
     """num_attention_heads""": """num_heads""",
     """num_hidden_layers""": """num_layers""",
 }


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

  super().__init__(**a__    )

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







'''simple docstring'''

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


snake_case									=    logging.get_logger(__name__)

snake_case									=    {
    """Visual-Attention-Network/van-base""": (
        """https://huggingface.co/Visual-Attention-Network/van-base/blob/main/config.json"""
    ),
}




class    lowerCAmelCase       (     UpperCamelCase_  ):
 A_				:				Tuple	=			"""van"""


 def __init__(    self  : List[Any]			,							a__  : Dict=224			,							a__  : Dict=3			,							a__  : Union[str, Any]=[7, 3, 3, 3]			,							a__  : Optional[Any]=[4, 2, 2, 2]			,							a__  : Optional[Any]=[64, 128, 320, 512]			,							a__  : List[str]=[3, 3, 12, 3]			,							a__  : Any=[8, 8, 4, 4]			,							a__  : Optional[int]="gelu"			,							a__  : List[Any]=0.02			,							a__  : Tuple=1e-6			,							a__  : List[str]=1e-2			,							a__  : List[str]=0.0			,							a__  : List[Any]=0.0			,							**a__  : Tuple			,							):
  '''simple docstring'''

  super().__init__(**a__    )
  lowerCAmelCase__     :   Any     		=	image_size
  lowerCAmelCase__     :   Tuple     		=	num_channels
  lowerCAmelCase__     :   List[Any]     		=	patch_sizes
  lowerCAmelCase__     :   Dict     		=	strides
  lowerCAmelCase__     :   List[str]     		=	hidden_sizes
  lowerCAmelCase__     :   Union[str, Any]     		=	depths
  lowerCAmelCase__     :   Tuple     		=	mlp_ratios
  lowerCAmelCase__     :   Optional[Any]     		=	hidden_act
  lowerCAmelCase__     :   Dict     		=	initializer_range
  lowerCAmelCase__     :   int     		=	layer_norm_eps
  lowerCAmelCase__     :   Optional[Any]     		=	layer_scale_init_value
  lowerCAmelCase__     :   List[str]     		=	drop_path_rate
  lowerCAmelCase__     :   Any     		=	dropout_rate





