import warnings

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


__a    :	Dict         =    logging.get_logger(__name__)

__a    :	List[Any]         =    {
    """xlnet-base-cased""": """https://huggingface.co/xlnet-base-cased/resolve/main/config.json""",
    """xlnet-large-cased""": """https://huggingface.co/xlnet-large-cased/resolve/main/config.json""",
}




class   _UpperCamelCase (		_UpperCAmelCase					):


			"""simple docstring"""






			__a    :					int     					=		'''xlnet'''
			__a    :					Tuple     					=		['''mems''']
			__a    :					List[str]     					=		{
			    '''n_token''': '''vocab_size''',  # Backward compatibility
			    '''hidden_size''': '''d_model''',
			    '''num_attention_heads''': '''n_head''',
			    '''num_hidden_layers''': '''n_layer''',
			}





			def __init__(  self ,  lowerCAmelCase__=3_20_00 ,  lowerCAmelCase__=10_24 ,  lowerCAmelCase__=24 ,  lowerCAmelCase__=16 ,  lowerCAmelCase__=40_96 ,  lowerCAmelCase__="gelu" ,  lowerCAmelCase__=True ,  lowerCAmelCase__="bi" ,  lowerCAmelCase__=0.02 ,  lowerCAmelCase__=1E-12 ,  lowerCAmelCase__=0.1 ,  lowerCAmelCase__=5_12 ,  lowerCAmelCase__=None ,  lowerCAmelCase__=True ,  lowerCAmelCase__=False ,  lowerCAmelCase__=False ,  lowerCAmelCase__=-1 ,  lowerCAmelCase__=False ,  lowerCAmelCase__="last" ,  lowerCAmelCase__=True ,  lowerCAmelCase__="tanh" ,  lowerCAmelCase__=0.1 ,  lowerCAmelCase__=5 ,  lowerCAmelCase__=5 ,  lowerCAmelCase__=5 ,  lowerCAmelCase__=1 ,  lowerCAmelCase__=2 ,  **lowerCAmelCase__ ,  )	->   Any:

							'''simple docstring'''


							__lowercase					     =				vocab_size
							__lowercase					     =				d_model
							__lowercase					     =				n_layer
							__lowercase					     =				n_head
							if d_model % n_head != 0:
											raise ValueError(F"'d_model % n_head' ({d_model % n_head}) should be equal to 0"		)
							if "d_head" in kwargs:
											if kwargs["d_head"] != d_model // n_head:
															raise ValueError(
															    F"`d_head` ({kwargs['d_head']}) should be equal to `d_model // n_head` ({d_model // n_head})"		)
							__lowercase					     =				d_model // n_head
							__lowercase					     =				ff_activation
							__lowercase					     =				d_inner
							__lowercase					     =				untie_r
							__lowercase					     =				attn_type

							__lowercase					     =				initializer_range
							__lowercase					     =				layer_norm_eps

							__lowercase					     =				dropout
							__lowercase					     =				mem_len
							__lowercase					     =				reuse_len
							__lowercase					     =				bi_data
							__lowercase					     =				clamp_len
							__lowercase					     =				same_length

							__lowercase					     =				summary_type
							__lowercase					     =				summary_use_proj
							__lowercase					     =				summary_activation
							__lowercase					     =				summary_last_dropout
							__lowercase					     =				start_n_top
							__lowercase					     =				end_n_top

							__lowercase					     =				bos_token_id
							__lowercase					     =				pad_token_id
							__lowercase					     =				eos_token_id

							if "use_cache" in kwargs:
											warnings.warn(
											    '''The `use_cache` argument is deprecated and will be removed in a future version, use `use_mems_eval`'''
											    ''' instead.''' ,  lowerCAmelCase__ ,  )
											__lowercase					     =				kwargs['''use_cache''']

							__lowercase					     =				use_mems_eval
							__lowercase					     =				use_mems_train
							super().__init__(pad_token_id=lowerCAmelCase__ ,  bos_token_id=lowerCAmelCase__ ,  eos_token_id=lowerCAmelCase__ ,  **lowerCAmelCase__		)





			@property
			def 			_SCREAMING_SNAKE_CASE     (  self		)	->   List[Any]:

							'''simple docstring'''


							logger.info(F"The model {self.model_type} is one of the few models that has no sequence length limit."		)
							return -1





			@max_position_embeddings.setter
			def 			_SCREAMING_SNAKE_CASE     (  self ,  lowerCAmelCase__		)	->   Tuple:

							'''simple docstring'''


							raise NotImplementedError(
							    F"The model {self.model_type} is one of the few models that has no sequence length limit."		)
from ...configuration_utils import PretrainedConfig
from ...utils import logging


__a    :	List[Any]         =    logging.get_logger(__name__)

__a    :	List[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   _UpperCamelCase (		_UpperCAmelCase					):


			"""simple docstring"""






			__a    :					Optional[Any]     					=		'''audio-spectrogram-transformer'''





			def __init__(  self ,  lowerCAmelCase__=7_68 ,  lowerCAmelCase__=12 ,  lowerCAmelCase__=12 ,  lowerCAmelCase__=30_72 ,  lowerCAmelCase__="gelu" ,  lowerCAmelCase__=0.0 ,  lowerCAmelCase__=0.0 ,  lowerCAmelCase__=0.02 ,  lowerCAmelCase__=1E-12 ,  lowerCAmelCase__=16 ,  lowerCAmelCase__=True ,  lowerCAmelCase__=10 ,  lowerCAmelCase__=10 ,  lowerCAmelCase__=10_24 ,  lowerCAmelCase__=1_28 ,  **lowerCAmelCase__ ,  )	->   Optional[Any]:

							'''simple docstring'''


							super().__init__(**lowerCAmelCase__		)

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