




"""simple docstring"""




# Lint as: python3
import dataclasses
import re
from dataclasses import dataclass
from functools import total_ordering
from typing import Optional, Union


lowerCAmelCase							:    Optional[Any]  							=							re.compile(r"""^(?P<major>\d+)""" r"""\.(?P<minor>\d+)""" r"""\.(?P<patch>\d+)$""")






@total_ordering
@dataclass
class 					__magic_name__							:






				'''simple docstring'''
				__UpperCamelCase    						=		42
				__UpperCamelCase    						=		None
				__UpperCamelCase    						=		None
				__UpperCamelCase    						=		None
				__UpperCamelCase    						=		None





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     lowerCamelCase   ,     lowerCamelCase       =      _str_to_version_tuple(self.version_str				)





				def __repr__( self				):





							"""simple docstring"""
							return f'{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}'





				@property
				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							return self.major, self.minor, self.patch





				def      _lowerCAmelCase       ( self	,				_a				):





							"""simple docstring"""
							if isinstance(_a	,				_a				):
										return Version(_a				)
							elif isinstance(_a	,				_a				):
										return other
							raise TypeError(f'{other} (type {type(_a				)}) cannot be compared to version.'				)





				def __eq__( self	,				_a				):





							"""simple docstring"""
							try:
										lowerCamelCase       =      self._validate_operand(_a				)
							except (TypeError, ValueError):
										return False
							else:
										return self.tuple == other.tuple





				def __lt__( self	,				_a				):





							"""simple docstring"""
							lowerCamelCase       =      self._validate_operand(_a				)
							return self.tuple < other.tuple





				def __hash__( self				):





							"""simple docstring"""
							return hash(_version_tuple_to_str(self.tuple				)				)





				@classmethod
				def      _lowerCAmelCase       ( cls	,				_a				):





							"""simple docstring"""
							lowerCamelCase       =      {f.name for f in dataclasses.fields(cls				)}
							return cls(**{k: v for k, v in dic.items() if k in field_names}				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							return self.version_str




def 					a__				(       snake_case__       )		->      Optional[Any]:
			lowerCamelCase       =      _VERSION_REG.match(snake_case__       )
			if not res:
						raise ValueError(F'Invalid version \'{version_str}\'. Format should be x.y.z with {{x,y,z}} being digits.'       )
			return tuple(int(snake_case__       ) for v in [res.group("""major"""       ), res.group("""minor"""       ), res.group("""patch"""       )]       )



def 					a__				(       snake_case__       )		->      Any:
			return ".".join(str(snake_case__       ) for v in version_tuple       )









"""simple docstring"""




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


lowerCAmelCase							:    Dict  							=							logging.get_logger(__name__)

lowerCAmelCase							:    Optional[Any]  							=							{
    """MIT/ast-finetuned-audioset-10-10-0.4593""": (
        """https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593/resolve/main/config.json"""
    ),
}






class 					__magic_name__							( UpperCAmelCase__       ):






				'''simple docstring'''
				__UpperCamelCase    						=		"audio-spectrogram-transformer"





				def __init__( self	,				_a=768	,				_a=12	,				_a=12	,				_a=3_072	,				_a="gelu"	,				_a=0.0	,				_a=0.0	,				_a=0.02	,				_a=1e-1_2	,				_a=16	,				_a=True	,				_a=10	,				_a=10	,				_a=1_024	,				_a=128	,				**_a	,				):





							"""simple docstring"""
							super().__init__(**_a				)

							lowerCamelCase       =      hidden_size
							lowerCamelCase       =      num_hidden_layers
							lowerCamelCase       =      num_attention_heads
							lowerCamelCase       =      intermediate_size
							lowerCamelCase       =      hidden_act
							lowerCamelCase       =      hidden_dropout_prob
							lowerCamelCase       =      attention_probs_dropout_prob
							lowerCamelCase       =      initializer_range
							lowerCamelCase       =      layer_norm_eps
							lowerCamelCase       =      patch_size
							lowerCamelCase       =      qkv_bias
							lowerCamelCase       =      frequency_stride
							lowerCamelCase       =      time_stride
							lowerCamelCase       =      max_length
							lowerCamelCase       =      num_mel_bins



