





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


UpperCamelCase__   : Tuple					  = logging.get_logger(__name__)

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







class   _UpperCamelCase  (       _UpperCamelCase  ):







					'''simple docstring'''

					lowerCamelCase     :     Dict			    =       'van'





					def __init__(						self    :  Optional[int] ,					__lowercase    :  Optional[int]=2_24 ,					__lowercase    :  Tuple=3 ,					__lowercase    :  Optional[Any]=[7, 3, 3, 3] ,					__lowercase    :  Dict=[4, 2, 2, 2] ,					__lowercase    :  List[Any]=[64, 1_28, 3_20, 5_12] ,					__lowercase    :  Any=[3, 3, 12, 3] ,					__lowercase    :  Any=[8, 8, 4, 4] ,					__lowercase    :  Dict="gelu" ,					__lowercase    :  Optional[Any]=0.02 ,					__lowercase    :  Dict=1e-6 ,					__lowercase    :  Dict=1e-2 ,					__lowercase    :  int=0.0 ,					__lowercase    :  int=0.0 ,					**__lowercase    :  Optional[Any] ,					):






						'''simple docstring'''







						super().__init__(**__lowercase		)
						UpperCAmelCase_								=     image_size
						UpperCAmelCase_								=     num_channels
						UpperCAmelCase_								=     patch_sizes
						UpperCAmelCase_								=     strides
						UpperCAmelCase_								=     hidden_sizes
						UpperCAmelCase_								=     depths
						UpperCAmelCase_								=     mlp_ratios
						UpperCAmelCase_								=     hidden_act
						UpperCAmelCase_								=     initializer_range
						UpperCAmelCase_								=     layer_norm_eps
						UpperCAmelCase_								=     layer_scale_init_value
						UpperCAmelCase_								=     drop_path_rate
						UpperCAmelCase_								=     dropout_rate









from torch import nn







class   _UpperCamelCase  (       nn.Module  ):







					'''simple docstring'''

					def __init__(						self    :  Dict ,					__lowercase    :  List[str] ,					__lowercase    :  Dict		):






						'''simple docstring'''







						super().__init__()
						UpperCAmelCase_								=     class_size
						UpperCAmelCase_								=     embed_size
						# self.mlp1 = nn.Linear(embed_size, embed_size)
						# self.mlp2 = (nn.Linear(embed_size, class_size))
						UpperCAmelCase_								=     nn.Linear(__lowercase ,					__lowercase		)





					def        SCREAMING_SNAKE_CASE							(						self    :  Any ,					__lowercase    :  Optional[Any]		):






						'''simple docstring'''







						UpperCAmelCase_								=     self.mlp(__lowercase		)
						return logits


