






"""simple docstring"""





import functools
import operator

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


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

UpperCamelCase_	:				Optional[int]										= {
    """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      _lowercase (     lowerCAmelCase						):
      _a   :     int								=   '''sew'''


      def __init__(    self				:	str							,   a				:	Union[str, Any]=3_2							,   a				:	Optional[Any]=7_6_8							,   a				:	Any=1_2							,   a				:	Any=1_2							,   a				:	Tuple=3_0_7_2							,   a				:	List[str]=2							,   a				:	Optional[Any]="gelu"							,   a				:	Any=0.1							,   a				:	List[str]=0.1							,   a				:	Dict=0.1							,   a				:	List[str]=0.0							,   a				:	Optional[int]=0.1							,   a				:	Any=0.1							,   a				:	List[Any]=0.0_2							,   a				:	Any=1e-5							,   a				:	Dict="group"							,   a				:	Union[str, Any]="gelu"							,   a				:	Optional[int]=(6_4, 1_2_8, 1_2_8, 1_2_8, 1_2_8, 2_5_6, 2_5_6, 2_5_6, 2_5_6, 5_1_2, 5_1_2, 5_1_2, 5_1_2)							,   a				:	Union[str, Any]=(5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1)							,   a				:	Optional[Any]=(1_0, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1)							,   a				:	int=False							,   a				:	str=1_2_8							,   a				:	List[Any]=1_6							,   a				:	List[Any]=True							,   a				:	List[str]=0.0_5							,   a				:	List[str]=1_0							,   a				:	List[str]=2							,   a				:	List[Any]=0.0							,   a				:	int=1_0							,   a				:	List[Any]=0							,   a				:	Union[str, Any]="mean"							,   a				:	str=False							,   a				:	List[str]=False							,   a				:	Tuple=2_5_6							,   a				:	int=0							,   a				:	Dict=1							,   a				:	str=2							,   **a				:	Optional[Any]							,   ):





            """simple docstring"""







            super().__init__(**a							,   pad_token_id=a							,   bos_token_id=a							,   eos_token_id=a						)
            __snake_case      :    int  			=hidden_size
            __snake_case      :    List[str]  			=feat_extract_norm
            __snake_case      :    Union[str, Any]  			=feat_extract_activation
            __snake_case      :    Tuple  			=list(a						)
            __snake_case      :    Union[str, Any]  			=list(a						)
            __snake_case      :    Any  			=list(a						)
            __snake_case      :    List[str]  			=conv_bias
            __snake_case      :    Union[str, Any]  			=num_conv_pos_embeddings
            __snake_case      :    Optional[int]  			=num_conv_pos_embedding_groups
            __snake_case      :    Optional[Any]  			=len(self.conv_dim						)
            __snake_case      :    str  			=num_hidden_layers
            __snake_case      :    Tuple  			=intermediate_size
            __snake_case      :    Union[str, Any]  			=squeeze_factor
            __snake_case      :    List[str]  			=hidden_act
            __snake_case      :    List[Any]  			=num_attention_heads
            __snake_case      :    Optional[int]  			=hidden_dropout
            __snake_case      :    List[Any]  			=attention_dropout
            __snake_case      :    Any  			=activation_dropout
            __snake_case      :    List[str]  			=feat_proj_dropout
            __snake_case      :    Optional[int]  			=final_dropout
            __snake_case      :    List[str]  			=layerdrop
            __snake_case      :    Union[str, Any]  			=layer_norm_eps
            __snake_case      :    List[Any]  			=initializer_range
            __snake_case      :    Optional[Any]  			=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
            __snake_case      :    List[Any]  			=apply_spec_augment
            __snake_case      :    str  			=mask_time_prob
            __snake_case      :    Tuple  			=mask_time_length
            __snake_case      :    List[Any]  			=mask_time_min_masks
            __snake_case      :    str  			=mask_feature_prob
            __snake_case      :    str  			=mask_feature_length
            __snake_case      :    Union[str, Any]  			=mask_feature_min_masks

            # ctc loss
            __snake_case      :    Union[str, Any]  			=ctc_loss_reduction
            __snake_case      :    Dict  			=ctc_zero_infinity

            # sequence classification
            __snake_case      :    Any  			=use_weighted_layer_sum
            __snake_case      :    List[Any]  			=classifier_proj_size







      @property
      def _UpperCamelCase						(    self				:	List[str]						):





            """simple docstring"""







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










"""simple docstring"""





from typing import TYPE_CHECKING

from ...utils import _LazyModule


UpperCamelCase_	:				Union[str, Any]										= {"""tokenization_wav2vec2_phoneme""": ["""Wav2Vec2PhonemeCTCTokenizer"""]}


if TYPE_CHECKING:
    from .tokenization_wavaveca_phoneme import WavaVecaPhonemeCTCTokenizer
else:
    import sys

    UpperCamelCase_	:				List[Any]										= _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


