


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


snake_case    :   Any	    =					logging.get_logger(__name__)

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







class 		_snake_case  (				_snake_case							):
 SCREAMING_SNAKE_CASE__				=	'swinv2'

 SCREAMING_SNAKE_CASE__				=	{
     'num_attention_heads': 'num_heads',
     'num_hidden_layers': 'num_layers',
 }




 def __init__(		self ,  _lowerCamelCase=224 ,  _lowerCamelCase=4 ,  _lowerCamelCase=3 ,  _lowerCamelCase=96 ,  _lowerCamelCase=[2, 2, 6, 2] ,  _lowerCamelCase=[3, 6, 12, 24] ,  _lowerCamelCase=7 ,  _lowerCamelCase=4.0 ,  _lowerCamelCase=True ,  _lowerCamelCase=0.0 ,  _lowerCamelCase=0.0 ,  _lowerCamelCase=0.1 ,  _lowerCamelCase="gelu" ,  _lowerCamelCase=False ,  _lowerCamelCase=0.02 ,  _lowerCamelCase=1e-5 ,  _lowerCamelCase=32 ,  **_lowerCamelCase ,  ):
       super().__init__(**_lowerCamelCase   )

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









from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


snake_case    :   Any	    =					{'''configuration_van''': ['''VAN_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''VanConfig''']}


try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     snake_case    :   Union[str, Any]	    =					[
         '''VAN_PRETRAINED_MODEL_ARCHIVE_LIST''',
         '''VanForImageClassification''',
         '''VanModel''',
         '''VanPreTrainedModel''',
     ]

if TYPE_CHECKING:
     from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_van import (
              VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
              VanForImageClassification,
              VanModel,
              VanPreTrainedModel,
          )

else:
     import sys

     snake_case    :   Optional[Any]	    =					_LazyModule(__name__, globals()['''__file__'''], _import_structure)





