

"""simple docstring"""



import functools
import operator

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


SCREAMING_SNAKE_CASE_					:	Union[str, Any]							  =						logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_					:	List[str]							  =						{
    'facebook/wav2vec2-base-960h': 'https://huggingface.co/facebook/wav2vec2-base-960h/resolve/main/config.json',
    # See all Wav2Vec2 models at https://huggingface.co/models?filter=wav2vec2
}



class 					a						(       _lowerCamelCase				):



    """simple docstring"""



    UpperCAmelCase						 =					"wav2vec2"

    def __init__(     self: int    ,						UpperCamelCase: Union[str, Any]=32    ,						UpperCamelCase: Dict=7_68    ,						UpperCamelCase: Optional[int]=12    ,						UpperCamelCase: List[str]=12    ,						UpperCamelCase: Tuple=30_72    ,						UpperCamelCase: Optional[Any]="gelu"    ,						UpperCamelCase: str=0.1    ,						UpperCamelCase: Optional[Any]=0.1    ,						UpperCamelCase: Any=0.1    ,						UpperCamelCase: Any=0.0    ,						UpperCamelCase: Union[str, Any]=0.0    ,						UpperCamelCase: List[Any]=0.1    ,						UpperCamelCase: List[Any]=0.1    ,						UpperCamelCase: Union[str, Any]=0.02    ,						UpperCamelCase: Tuple=1e-5    ,						UpperCamelCase: Tuple="group"    ,						UpperCamelCase: List[str]="gelu"    ,						UpperCamelCase: Any=(5_12, 5_12, 5_12, 5_12, 5_12, 5_12, 5_12)    ,						UpperCamelCase: Union[str, Any]=(5, 2, 2, 2, 2, 2, 2)    ,						UpperCamelCase: str=(10, 3, 3, 3, 3, 2, 2)    ,						UpperCamelCase: int=False    ,						UpperCamelCase: List[str]=1_28    ,						UpperCamelCase: Dict=16    ,						UpperCamelCase: Tuple=False    ,						UpperCamelCase: str=True    ,						UpperCamelCase: str=0.05    ,						UpperCamelCase: Optional[Any]=10    ,						UpperCamelCase: int=2    ,						UpperCamelCase: Optional[Any]=0.0    ,						UpperCamelCase: List[Any]=10    ,						UpperCamelCase: Optional[Any]=0    ,						UpperCamelCase: List[Any]=3_20    ,						UpperCamelCase: List[str]=2    ,						UpperCamelCase: Optional[int]=0.1    ,						UpperCamelCase: Tuple=1_00    ,						UpperCamelCase: str=2_56    ,						UpperCamelCase: Optional[Any]=2_56    ,						UpperCamelCase: List[str]=0.1    ,						UpperCamelCase: Optional[int]="sum"    ,						UpperCamelCase: List[Any]=False    ,						UpperCamelCase: Optional[Any]=False    ,						UpperCamelCase: Optional[int]=2_56    ,						UpperCamelCase: Union[str, Any]=(5_12, 5_12, 5_12, 5_12, 15_00)    ,						UpperCamelCase: Tuple=(5, 3, 3, 1, 1)    ,						UpperCamelCase: Tuple=(1, 2, 3, 1, 1)    ,						UpperCamelCase: List[Any]=5_12    ,						UpperCamelCase: Tuple=0    ,						UpperCamelCase: List[Any]=1    ,						UpperCamelCase: Dict=2    ,						UpperCamelCase: List[Any]=False    ,						UpperCamelCase: str=3    ,						UpperCamelCase: int=2    ,						UpperCamelCase: str=3    ,						UpperCamelCase: List[str]=None    ,						UpperCamelCase: Optional[int]=None    ,						**UpperCamelCase: 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__										=  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

         # adapter
         A__										=  add_adapter
         A__										=  adapter_kernel_size
         A__										=  adapter_stride
         A__										=  num_adapter_layers
         A__										=  output_hidden_size or hidden_size
         A__										=  adapter_attn_dim

         # 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 				UpperCamelCase	(     self: Dict       ):






         """simple docstring"""


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









"""simple docstring"""



import warnings

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


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



class 					a						(       _lowerCamelCase				):



    """simple docstring"""



    def __init__(     self: Tuple    ,						*UpperCamelCase: Optional[int]    ,						**UpperCamelCase: Tuple       ):






         """simple docstring"""


         warnings.warn(
             """The class VideoMAEFeatureExtractor is deprecated and will be removed in version 5 of Transformers."""
             """ Please use VideoMAEImageProcessor instead."""    ,						UpperCamelCase    ,						)
         super().__init__(*UpperCamelCase    ,						**UpperCamelCase       )






