




"""simple docstring"""




from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowerCAmelCase							:    Optional[int]  							=							logging.get_logger(__name__)

lowerCAmelCase							:    Optional[int]  							=							{
    """sail/poolformer_s12""": """https://huggingface.co/sail/poolformer_s12/resolve/main/config.json""",
    # See all PoolFormer models at https://huggingface.co/models?filter=poolformer
}






class 					__magic_name__							( UpperCAmelCase__       ):






				'''simple docstring'''
				__UpperCamelCase    						=		"poolformer"





				def __init__( self	,				_a=3	,				_a=16	,				_a=16	,				_a=3	,				_a=4.0	,				_a=[2, 2, 6, 2]	,				_a=[64, 128, 320, 512]	,				_a=[7, 3, 3, 3]	,				_a=[4, 2, 2, 2]	,				_a=[2, 1, 1, 1]	,				_a=4	,				_a=0.0	,				_a="gelu"	,				_a=True	,				_a=1e-5	,				_a=0.02	,				**_a	,				):





							"""simple docstring"""
							lowerCamelCase       =      num_channels
							lowerCamelCase       =      patch_size
							lowerCamelCase       =      stride
							lowerCamelCase       =      padding
							lowerCamelCase       =      pool_size
							lowerCamelCase       =      hidden_sizes
							lowerCamelCase       =      mlp_ratio
							lowerCamelCase       =      depths
							lowerCamelCase       =      patch_sizes
							lowerCamelCase       =      strides
							lowerCamelCase       =      num_encoder_blocks
							lowerCamelCase       =      drop_path_rate
							lowerCamelCase       =      hidden_act
							lowerCamelCase       =      use_layer_scale
							lowerCamelCase       =      layer_scale_init_value
							lowerCamelCase       =      initializer_range
							super().__init__(**_a				)






class 					__magic_name__							( UpperCAmelCase__       ):






				'''simple docstring'''
				__UpperCamelCase    						=		version.parse("1.11"       )





				@property
				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							return OrderedDict(
							    [
							        ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
							    ]				)





				@property
				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							return 2e-3









"""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



