



'''simple docstring'''





import functools
import operator

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


lowercase_	 =						logging.get_logger(__name__)

lowercase_	 =						{
    "asapp/sew-tiny-100k": "https://huggingface.co/asapp/sew-tiny-100k/resolve/main/config.json",
    # See all SEW models at https://huggingface.co/models?filter=sew
}






class __A    (						__lowerCamelCase		):



	'''simple docstring'''







	__lowerCamelCase					: Dict    = 'sew'



	def __init__(self				,     A=32				,     A=768				,     A=12				,     A=12				,     A=3_072				,     A=2				,     A="gelu"				,     A=0.1				,     A=0.1				,     A=0.1				,     A=0.0				,     A=0.1				,     A=0.1				,     A=0.02				,     A=1E-5				,     A="group"				,     A="gelu"				,     A=(64, 128, 128, 128, 128, 256, 256, 256, 256, 512, 512, 512, 512)				,     A=(5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1)				,     A=(10, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1)				,     A=False				,     A=128				,     A=16				,     A=True				,     A=0.05				,     A=10				,     A=2				,     A=0.0				,     A=10				,     A=0				,     A="mean"				,     A=False				,     A=False				,     A=256				,     A=0				,     A=1				,     A=2				,     **A				,     )					->  List[Any]:


						"""simple docstring"""



						super().__init__(**UpperCamelCase_				,     pad_token_id=UpperCamelCase_				,     bos_token_id=UpperCamelCase_				,     eos_token_id=UpperCamelCase_ )
						_a											=						hidden_size
						_a											=						feat_extract_norm
						_a											=						feat_extract_activation
						_a											=						list(UpperCamelCase_ )
						_a											=						list(UpperCamelCase_ )
						_a											=						list(UpperCamelCase_ )
						_a											=						conv_bias
						_a											=						num_conv_pos_embeddings
						_a											=						num_conv_pos_embedding_groups
						_a											=						len(self.conv_dim )
						_a											=						num_hidden_layers
						_a											=						intermediate_size
						_a											=						squeeze_factor
						_a											=						hidden_act
						_a											=						num_attention_heads
						_a											=						hidden_dropout
						_a											=						attention_dropout
						_a											=						activation_dropout
						_a											=						feat_proj_dropout
						_a											=						final_dropout
						_a											=						layerdrop
						_a											=						layer_norm_eps
						_a											=						initializer_range
						_a											=						vocab_size

						if (
						    (len(self.conv_stride ) != self.num_feat_extract_layers)
						    or (len(self.conv_kernel ) != self.num_feat_extract_layers)
						    or (len(self.conv_dim ) != self.num_feat_extract_layers)
						):
											raise ValueError(
											    '''Configuration for convolutional layers is incorrect.'''
											    '''It is required that `len(config.conv_dim)` == `len(config.conv_stride)` == `len(config.conv_kernel)`,'''
											    f'''but is `len(config.conv_dim) = {len(self.conv_dim )}`, `len(config.conv_stride)'''
											    f'''= {len(self.conv_stride )}`, `len(config.conv_kernel) = {len(self.conv_kernel )}`.''' )

						# fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
						_a											=						apply_spec_augment
						_a											=						mask_time_prob
						_a											=						mask_time_length
						_a											=						mask_time_min_masks
						_a											=						mask_feature_prob
						_a											=						mask_feature_length
						_a											=						mask_feature_min_masks

						# ctc loss
						_a											=						ctc_loss_reduction
						_a											=						ctc_zero_infinity

						# sequence classification
						_a											=						use_weighted_layer_sum
						_a											=						classifier_proj_size



	@property
	def       a__						(self )					->  Optional[int]:


						"""simple docstring"""



						return functools.reduce(operator.mul				,     self.conv_stride				,     1 )








'''simple docstring'''





# This is the module that test_patching.py uses to test patch_submodule()

import os  # noqa: this is just for tests
import os as renamed_os  # noqa: this is just for tests
from os import path  # noqa: this is just for tests
from os import path as renamed_path  # noqa: this is just for tests
from os.path import join  # noqa: this is just for tests
from os.path import join as renamed_join  # noqa: this is just for tests


lowercase_	 =						open  # noqa: we just need to have a builtin inside this module to test it properly



