


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


__lowercase											=      logging.get_logger(__name__)

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


class 			lowerCamelCase_  (     UpperCAmelCase_				):






    '''simple docstring'''






    a__			:		Any      			=   "swinv2"

    a__			:		Union[str, Any]      			=   {
        "num_attention_heads": "num_heads",
        "num_hidden_layers": "num_layers",
    }







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

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






from typing import TYPE_CHECKING

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


__lowercase											=      {
    '''configuration_audio_spectrogram_transformer''': [
        '''AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''ASTConfig''',
    ]
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowercase											=      [
        '''AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
        '''ASTForAudioClassification''',
        '''ASTModel''',
        '''ASTPreTrainedModel''',
    ]

try:
    if not is_speech_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowercase											=      ['''ASTFeatureExtractor''']

if TYPE_CHECKING:
    from .configuration_audio_spectrogram_transformer import (
        AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
        ASTConfig,
    )

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_audio_spectrogram_transformer import (
            AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
            ASTForAudioClassification,
            ASTModel,
            ASTPreTrainedModel,
        )

    try:
        if not is_speech_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .feature_extraction_audio_spectrogram_transformer import ASTFeatureExtractor


else:
    import sys

    __lowercase											=      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





