"""simple docstring"""



import functools
import operator

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


__magic_name__     					=       logging.get_logger(__name__)

__magic_name__     					=       {
    '''microsoft/unispeech-sat-base-100h-libri-ft''': (
        '''https://huggingface.co/microsoft/unispeech-sat-base-100h-libri-ft/resolve/main/config.json'''
    ),
    # See all UniSpeechSat models at https://huggingface.co/models?filter=unispeech_sat
}

class SCREAMING_SNAKE_CASE  (     snake_case__						):







 """simple docstring"""


 a_							:						Optional[Any]	      ='''unispeech-sat'''


 def __init__( self		:   int       , _snake_case		:   Optional[int]=32       , _snake_case		:   Tuple=768       , _snake_case		:   List[str]=12       , _snake_case		:   Optional[int]=12       , _snake_case		:   Dict=3072       , _snake_case		:   Optional[Any]="gelu"       , _snake_case		:   str=0.1       , _snake_case		:   Dict=0.1       , _snake_case		:   Any=0.1       , _snake_case		:   Tuple=0.0       , _snake_case		:   Dict=0.0       , _snake_case		:   List[str]=0.1       , _snake_case		:   List[str]=0.1       , _snake_case		:   Dict=0.02       , _snake_case		:   Tuple=1E-5       , _snake_case		:   Optional[int]="group"       , _snake_case		:   Dict="gelu"       , _snake_case		:   List[str]=(512, 512, 512, 512, 512, 512, 512)       , _snake_case		:   List[Any]=(5, 2, 2, 2, 2, 2, 2)       , _snake_case		:   Optional[int]=(10, 3, 3, 3, 3, 2, 2)       , _snake_case		:   Any=False       , _snake_case		:   int=128       , _snake_case		:   Union[str, Any]=16       , _snake_case		:   List[Any]=False       , _snake_case		:   Tuple=True       , _snake_case		:   Tuple=0.05       , _snake_case		:   Union[str, Any]=10       , _snake_case		:   Union[str, Any]=2       , _snake_case		:   Tuple=0.0       , _snake_case		:   str=10       , _snake_case		:   Union[str, Any]=0       , _snake_case		:   Tuple=320       , _snake_case		:   Optional[Any]=2       , _snake_case		:   Optional[Any]=0.1       , _snake_case		:   int=100       , _snake_case		:   Optional[int]=256       , _snake_case		:   int=256       , _snake_case		:   Optional[Any]=0.1       , _snake_case		:   int="mean"       , _snake_case		:   Dict=False       , _snake_case		:   Union[str, Any]=False       , _snake_case		:   Any=256       , _snake_case		:   Union[str, Any]=(512, 512, 512, 512, 1500)       , _snake_case		:   List[Any]=(5, 3, 3, 1, 1)       , _snake_case		:   Optional[Any]=(1, 2, 3, 1, 1)       , _snake_case		:   Optional[int]=512       , _snake_case		:   Dict=0       , _snake_case		:   int=1       , _snake_case		:   List[Any]=2       , _snake_case		:   Optional[Any]=504       , **_snake_case		:   Tuple       , )					->      List[str]:




    '''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__  					=		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
    a__  					=		num_clusters
    a__  					=		do_stable_layer_norm
    a__  					=		use_weighted_layer_sum

    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)`, but is `len(config.conv_dim) ='
           F''' {len(self.conv_dim					)}`, `len(config.conv_stride) = {len(self.conv_stride					)}`,'''
           F''' `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

    # parameters for pretraining with codevector quantized representations
    a__  					=		num_codevectors_per_group
    a__  					=		num_codevector_groups
    a__  					=		contrastive_logits_temperature
    a__  					=		feat_quantizer_dropout
    a__  					=		num_negatives
    a__  					=		codevector_dim
    a__  					=		proj_codevector_dim
    a__  					=		diversity_loss_weight

    # ctc loss
    a__  					=		ctc_loss_reduction
    a__  					=		ctc_zero_infinity

    # SequenceClassification-specific parameter. Feel free to ignore for other classes.
    a__  					=		classifier_proj_size

    # XVector-specific parameters. Feel free to ignore for other classes.
    a__  					=		list(_UpperCAmelCase					)
    a__  					=		list(_UpperCAmelCase					)
    a__  					=		list(_UpperCAmelCase					)
    a__  					=		xvector_output_dim



 @property
 def 							_lowerCAmelCase					( self		:   str					)					->      int:




    '''simple docstring'''






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







'''simple docstring'''

import warnings

from ...utils import logging
from .image_processing_glpn import GLPNImageProcessor


SCREAMING_SNAKE_CASE__     :						Optional[Any]	=  logging.get_logger(__name__)

class 							a__( snake_case__     ):






			def __init__(     self					,   *_UpperCAmelCase					,   **_UpperCAmelCase						)							->							None:
					warnings.warn(
					    'The class GLPNFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please'
					    ' use GLPNImageProcessor instead.'					,   _UpperCAmelCase					,   )
					super().__init__(*_UpperCAmelCase					,   **_UpperCAmelCase						)




