"""simple docstring"""







import functools
import operator

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


_a					:					Tuple=			logging.get_logger(__name__)

_a					:					List[str]=			{
    "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 		UpperCamelCase      (   lowercase						):
				UpperCAmelCase    :				Any   =		"""unispeech-sat"""



				def __init__(self    :				str     ,  _A    :				Any=32     ,  _A    :				int=7_68     ,  _A    :				str=12     ,  _A    :				int=12     ,  _A    :				List[Any]=30_72     ,  _A    :				Optional[Any]="gelu"     ,  _A    :				List[Any]=0.1     ,  _A    :				List[str]=0.1     ,  _A    :				List[str]=0.1     ,  _A    :				List[Any]=0.0     ,  _A    :				int=0.0     ,  _A    :				Union[str, Any]=0.1     ,  _A    :				List[str]=0.1     ,  _A    :				List[Any]=0.02     ,  _A    :				Optional[Any]=1E-5     ,  _A    :				int="group"     ,  _A    :				Any="gelu"     ,  _A    :				Any=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12)     ,  _A    :				str=(5, 2, 2, 2, 2, 2, 2)     ,  _A    :				Tuple=(10, 3, 3, 3, 3, 2, 2)     ,  _A    :				Optional[int]=False     ,  _A    :				Tuple=1_28     ,  _A    :				Optional[int]=16     ,  _A    :				List[Any]=False     ,  _A    :				List[str]=True     ,  _A    :				str=0.05     ,  _A    :				Optional[Any]=10     ,  _A    :				Dict=2     ,  _A    :				str=0.0     ,  _A    :				Any=10     ,  _A    :				str=0     ,  _A    :				Union[str, Any]=3_20     ,  _A    :				List[Any]=2     ,  _A    :				str=0.1     ,  _A    :				Dict=1_00     ,  _A    :				Tuple=2_56     ,  _A    :				Any=2_56     ,  _A    :				Tuple=0.1     ,  _A    :				Optional[int]="mean"     ,  _A    :				List[Any]=False     ,  _A    :				Union[str, Any]=False     ,  _A    :				Any=2_56     ,  _A    :				List[Any]=(5_12, 5_12, 5_12, 5_12, 15_00)     ,  _A    :				Optional[int]=(5, 3, 3, 1, 1)     ,  _A    :				List[Any]=(1, 2, 3, 1, 1)     ,  _A    :				List[Any]=5_12     ,  _A    :				List[str]=0     ,  _A    :				List[str]=1     ,  _A    :				List[Any]=2     ,  _A    :				Optional[Any]=5_04     ,  **_A    :				Dict     ,  )   ->     List[Any]:
					super().__init__(**_A     ,  pad_token_id=_A     ,  bos_token_id=_A     ,  eos_token_id=_A)
					__snake_case      :							Any						=			hidden_size
					__snake_case      :							int						=			feat_extract_norm
					__snake_case      :							Optional[Any]						=			feat_extract_activation
					__snake_case      :							List[str]						=			list(_A)
					__snake_case      :							Any						=			list(_A)
					__snake_case      :							str						=			list(_A)
					__snake_case      :							List[str]						=			conv_bias
					__snake_case      :							Union[str, Any]						=			num_conv_pos_embeddings
					__snake_case      :							List[str]						=			num_conv_pos_embedding_groups
					__snake_case      :							Any						=			len(self.conv_dim)
					__snake_case      :							List[str]						=			num_hidden_layers
					__snake_case      :							Optional[int]						=			intermediate_size
					__snake_case      :							List[Any]						=			hidden_act
					__snake_case      :							Dict						=			num_attention_heads
					__snake_case      :							Any						=			hidden_dropout
					__snake_case      :							Dict						=			attention_dropout
					__snake_case      :							List[str]						=			activation_dropout
					__snake_case      :							str						=			feat_proj_dropout
					__snake_case      :							str						=			final_dropout
					__snake_case      :							int						=			layerdrop
					__snake_case      :							int						=			layer_norm_eps
					__snake_case      :							Any						=			initializer_range
					__snake_case      :							str						=			vocab_size
					__snake_case      :							Dict						=			num_clusters
					__snake_case      :							Optional[int]						=			do_stable_layer_norm
					__snake_case      :							List[str]						=			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
					__snake_case      :							Optional[int]						=			apply_spec_augment
					__snake_case      :							Dict						=			mask_time_prob
					__snake_case      :							Optional[int]						=			mask_time_length
					__snake_case      :							str						=			mask_time_min_masks
					__snake_case      :							Optional[int]						=			mask_feature_prob
					__snake_case      :							Any						=			mask_feature_length
					__snake_case      :							Tuple						=			mask_feature_min_masks

					# parameters for pretraining with codevector quantized representations
					__snake_case      :							List[str]						=			num_codevectors_per_group
					__snake_case      :							Dict						=			num_codevector_groups
					__snake_case      :							Tuple						=			contrastive_logits_temperature
					__snake_case      :							Optional[int]						=			feat_quantizer_dropout
					__snake_case      :							Any						=			num_negatives
					__snake_case      :							List[str]						=			codevector_dim
					__snake_case      :							Union[str, Any]						=			proj_codevector_dim
					__snake_case      :							List[Any]						=			diversity_loss_weight

					# ctc loss
					__snake_case      :							List[Any]						=			ctc_loss_reduction
					__snake_case      :							Optional[int]						=			ctc_zero_infinity

					# SequenceClassification-specific parameter. Feel free to ignore for other classes.
					__snake_case      :							Any						=			classifier_proj_size

					# XVector-specific parameters. Feel free to ignore for other classes.
					__snake_case      :							Tuple						=			list(_A)
					__snake_case      :							Union[str, Any]						=			list(_A)
					__snake_case      :							Dict						=			list(_A)
					__snake_case      :							Optional[Any]						=			xvector_output_dim






				@property
				def  _lowercase					(self    :				Any)   ->     Tuple:
					return functools.reduce(operator.mul     ,  self.conv_stride     ,  1)






"""simple docstring"""







import warnings

from ...utils import logging
from .image_processing_videomae import VideoMAEImageProcessor


_a					:					Tuple=			logging.get_logger(__name__)

class 		UpperCamelCase      (   lowercase						):



				def __init__(self    :				int     ,  *_A    :				str     ,  **_A    :				List[str])   ->     None:
					warnings.warn(
					    'The class VideoMAEFeatureExtractor is deprecated and will be removed in version 5 of Transformers.'
					    ' Please use VideoMAEImageProcessor instead.'     ,  _A     ,  )
					super().__init__(*_A     ,  **_A)





