





from typing import TYPE_CHECKING

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


UpperCAmelCase_      							=     {
    """configuration_audio_spectrogram_transformer""": [
        """AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """ASTConfig""",
    ]
}

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

try:
					if not is_speech_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCAmelCase_      							=     ["""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

					UpperCAmelCase_      							=     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)










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


UpperCAmelCase_      							=     logging.get_logger(__name__)

UpperCAmelCase_      							=     {
    """sayakpaul/vit-msn-base""": """https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json""",
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}
class 			UpperCamelCase_		(  _lowerCamelCase					):
					lowerCAmelCase_							=	'''vit_msn'''




					def __init__(		self				,						lowerCAmelCase_=768				,						lowerCAmelCase_=12				,						lowerCAmelCase_=12				,						lowerCAmelCase_=3072				,						lowerCAmelCase_="gelu"				,						lowerCAmelCase_=0.0				,						lowerCAmelCase_=0.0				,						lowerCAmelCase_=0.02				,						lowerCAmelCase_=1E-06				,						lowerCAmelCase_=224				,						lowerCAmelCase_=16				,						lowerCAmelCase_=3				,						lowerCAmelCase_=True				,						**lowerCAmelCase_				,						)		->							str:
										super().__init__(**lowerCAmelCase_  )

										_snake_case									=				hidden_size
										_snake_case									=				num_hidden_layers
										_snake_case									=				num_attention_heads
										_snake_case									=				intermediate_size
										_snake_case									=				hidden_act
										_snake_case									=				hidden_dropout_prob
										_snake_case									=				attention_probs_dropout_prob
										_snake_case									=				initializer_range
										_snake_case									=				layer_norm_eps
										_snake_case									=				image_size
										_snake_case									=				patch_size
										_snake_case									=				num_channels
										_snake_case									=				qkv_bias



