





"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


A       	=     {
    'configuration_albert': ['ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'AlbertConfig', 'AlbertOnnxConfig'],
}

try:
		if not is_sentencepiece_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A       	=     ['AlbertTokenizer']

try:
		if not is_tokenizers_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A       	=     ['AlbertTokenizerFast']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A       	=     [
		    'ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'AlbertForMaskedLM',
		    'AlbertForMultipleChoice',
		    'AlbertForPreTraining',
		    'AlbertForQuestionAnswering',
		    'AlbertForSequenceClassification',
		    'AlbertForTokenClassification',
		    'AlbertModel',
		    'AlbertPreTrainedModel',
		    'load_tf_weights_in_albert',
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A       	=     [
		    'TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'TFAlbertForMaskedLM',
		    'TFAlbertForMultipleChoice',
		    'TFAlbertForPreTraining',
		    'TFAlbertForQuestionAnswering',
		    'TFAlbertForSequenceClassification',
		    'TFAlbertForTokenClassification',
		    'TFAlbertMainLayer',
		    'TFAlbertModel',
		    'TFAlbertPreTrainedModel',
		]

try:
		if not is_flax_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A       	=     [
		    'FlaxAlbertForMaskedLM',
		    'FlaxAlbertForMultipleChoice',
		    'FlaxAlbertForPreTraining',
		    'FlaxAlbertForQuestionAnswering',
		    'FlaxAlbertForSequenceClassification',
		    'FlaxAlbertForTokenClassification',
		    'FlaxAlbertModel',
		    'FlaxAlbertPreTrainedModel',
		]

if TYPE_CHECKING:
		from .configuration_albert import ALBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, AlbertConfig, AlbertOnnxConfig

		try:
				if not is_sentencepiece_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_albert import AlbertTokenizer

		try:
				if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_albert_fast import AlbertTokenizerFast

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_albert import (
				    ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    AlbertForMaskedLM,
				    AlbertForMultipleChoice,
				    AlbertForPreTraining,
				    AlbertForQuestionAnswering,
				    AlbertForSequenceClassification,
				    AlbertForTokenClassification,
				    AlbertModel,
				    AlbertPreTrainedModel,
				    load_tf_weights_in_albert,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_albert import (
				    TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFAlbertForMaskedLM,
				    TFAlbertForMultipleChoice,
				    TFAlbertForPreTraining,
				    TFAlbertForQuestionAnswering,
				    TFAlbertForSequenceClassification,
				    TFAlbertForTokenClassification,
				    TFAlbertMainLayer,
				    TFAlbertModel,
				    TFAlbertPreTrainedModel,
				)

		try:
				if not is_flax_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_flax_albert import (
				    FlaxAlbertForMaskedLM,
				    FlaxAlbertForMultipleChoice,
				    FlaxAlbertForPreTraining,
				    FlaxAlbertForQuestionAnswering,
				    FlaxAlbertForSequenceClassification,
				    FlaxAlbertForTokenClassification,
				    FlaxAlbertModel,
				    FlaxAlbertPreTrainedModel,
				)
else:
		import sys

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

"""simple docstring"""




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


UpperCAmelCase__      :    Optional[Any]    							= logging.get_logger(__name__)

UpperCAmelCase__      :    Dict    							= {
    'MIT/ast-finetuned-audioset-10-10-0.4593': (
        'https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593/resolve/main/config.json'
    ),
}



class 	lowerCAmelCase_						(a__  ):


				"""simple docstring"""



				__UpperCamelCase      :						Optional[int]					       =   '''audio-spectrogram-transformer'''



				def __init__(self   ,       SCREAMING_SNAKE_CASE__=7_68   ,       SCREAMING_SNAKE_CASE__=12   ,       SCREAMING_SNAKE_CASE__=12   ,       SCREAMING_SNAKE_CASE__=30_72   ,       SCREAMING_SNAKE_CASE__="gelu"   ,       SCREAMING_SNAKE_CASE__=0.0   ,       SCREAMING_SNAKE_CASE__=0.0   ,       SCREAMING_SNAKE_CASE__=0.02   ,       SCREAMING_SNAKE_CASE__=1E-12   ,       SCREAMING_SNAKE_CASE__=16   ,       SCREAMING_SNAKE_CASE__=True   ,       SCREAMING_SNAKE_CASE__=10   ,       SCREAMING_SNAKE_CASE__=10   ,       SCREAMING_SNAKE_CASE__=10_24   ,       SCREAMING_SNAKE_CASE__=1_28   ,       **SCREAMING_SNAKE_CASE__   ,       )					->		Tuple:



											"""simple docstring"""




											super().__init__(**SCREAMING_SNAKE_CASE__    )

											SCREAMING_SNAKE_CASE__						:       Optional[Any]           =   hidden_size
											SCREAMING_SNAKE_CASE__						:       str           =   num_hidden_layers
											SCREAMING_SNAKE_CASE__						:       int           =   num_attention_heads
											SCREAMING_SNAKE_CASE__						:       Tuple           =   intermediate_size
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   hidden_act
											SCREAMING_SNAKE_CASE__						:       Any           =   hidden_dropout_prob
											SCREAMING_SNAKE_CASE__						:       List[Any]           =   attention_probs_dropout_prob
											SCREAMING_SNAKE_CASE__						:       int           =   initializer_range
											SCREAMING_SNAKE_CASE__						:       int           =   layer_norm_eps
											SCREAMING_SNAKE_CASE__						:       Dict           =   patch_size
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   qkv_bias
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   frequency_stride
											SCREAMING_SNAKE_CASE__						:       Any           =   time_stride
											SCREAMING_SNAKE_CASE__						:       Optional[int]           =   max_length
											SCREAMING_SNAKE_CASE__						:       Any           =   num_mel_bins




