




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCamelCase__ :   Optional[Any]						=							{
    '''configuration_swinv2''': ['''SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''Swinv2Config'''],
}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						UpperCamelCase__ :   Dict						=							[
						    '''SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''Swinv2ForImageClassification''',
						    '''Swinv2ForMaskedImageModeling''',
						    '''Swinv2Model''',
						    '''Swinv2PreTrainedModel''',
						]


if TYPE_CHECKING:
						from .configuration_swinva import SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinvaConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_swinva import (
												    SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST,
												    SwinvaForImageClassification,
												    SwinvaForMaskedImageModeling,
												    SwinvaModel,
												    SwinvaPreTrainedModel,
												)


else:
						import sys

						UpperCamelCase__ :   Any						=							_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)









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


UpperCamelCase__ :   Any						=							logging.get_logger(__name__)

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







class 				lowerCAmelCase_       (					lowerCamelCase_							):
				__a     :       List[Any]						=     "van"






				def __init__(			self      ,snake_case__=224      ,snake_case__=3      ,snake_case__=[7, 3, 3, 3]      ,snake_case__=[4, 2, 2, 2]      ,snake_case__=[64, 128, 320, 512]      ,snake_case__=[3, 3, 12, 3]      ,snake_case__=[8, 8, 4, 4]      ,snake_case__="gelu"      ,snake_case__=0.02      ,snake_case__=1E-6      ,snake_case__=1E-2      ,snake_case__=0.0      ,snake_case__=0.0      ,**snake_case__      ,):
							super().__init__(**snake_case__ )
							SCREAMING_SNAKE_CASE_   : Tuple					  =      image_size
							SCREAMING_SNAKE_CASE_   : List[str]					  =      num_channels
							SCREAMING_SNAKE_CASE_   : Dict					  =      patch_sizes
							SCREAMING_SNAKE_CASE_   : str					  =      strides
							SCREAMING_SNAKE_CASE_   : str					  =      hidden_sizes
							SCREAMING_SNAKE_CASE_   : str					  =      depths
							SCREAMING_SNAKE_CASE_   : Optional[Any]					  =      mlp_ratios
							SCREAMING_SNAKE_CASE_   : Optional[int]					  =      hidden_act
							SCREAMING_SNAKE_CASE_   : Optional[int]					  =      initializer_range
							SCREAMING_SNAKE_CASE_   : Optional[int]					  =      layer_norm_eps
							SCREAMING_SNAKE_CASE_   : int					  =      layer_scale_init_value
							SCREAMING_SNAKE_CASE_   : Union[str, Any]					  =      drop_path_rate
							SCREAMING_SNAKE_CASE_   : List[str]					  =      dropout_rate



