

"""simple docstring"""




import functools
import operator

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


__UpperCAmelCase	=			logging.get_logger(__name__)

__UpperCAmelCase	=			{
    'facebook/hubert-base-ls960': 'https://huggingface.co/facebook/hubert-base-ls960/resolve/main/config.json',
    # See all Hubert models at https://huggingface.co/models?filter=hubert
}







class        __lowercase     (      __lowerCamelCase   ):
  snake_case_			    =    """hubert"""

  def __init__(					self						:     List[str]   ,A						:     str=32   ,A						:     Union[str, Any]=768   ,A						:     str=12   ,A						:     List[Any]=12   ,A						:     Dict=3_072   ,A						:     str="gelu"   ,A						:     Optional[int]=0.1   ,A						:     Optional[int]=0.1   ,A						:     str=0.1   ,A						:     List[Any]=True   ,A						:     Any=0.0   ,A						:     Any=0.1   ,A						:     str=0.1   ,A						:     List[str]=0.0_2   ,A						:     Dict=1e-5   ,A						:     Dict="group"   ,A						:     Optional[Any]="gelu"   ,A						:     Union[str, Any]=(512, 512, 512, 512, 512, 512, 512)   ,A						:     Dict=(5, 2, 2, 2, 2, 2, 2)   ,A						:     Any=(10, 3, 3, 3, 3, 2, 2)   ,A						:     List[Any]=False   ,A						:     Optional[int]=128   ,A						:     List[Any]=16   ,A						:     Optional[Any]=False   ,A						:     Optional[int]=True   ,A						:     List[str]=0.0_5   ,A						:     Union[str, Any]=10   ,A						:     int=2   ,A						:     str=0.0   ,A						:     List[str]=10   ,A						:     str=0   ,A						:     List[Any]="sum"   ,A						:     Any=False   ,A						:     Union[str, Any]=False   ,A						:     Tuple=256   ,A						:     str=0   ,A						:     List[Any]=1   ,A						:     Any=2   ,**A						:     Any   ,):






   '''simple docstring'''
   super().__init__(**A   ,pad_token_id=A   ,bos_token_id=A   ,eos_token_id=A      )
   UpperCAmelCase__   :					Union[str, Any]   				=   hidden_size
   UpperCAmelCase__   :					str   				=   feat_extract_norm
   UpperCAmelCase__   :					List[Any]   				=   feat_extract_activation
   UpperCAmelCase__   :					Any   				=   list(A      )
   UpperCAmelCase__   :					Dict   				=   list(A      )
   UpperCAmelCase__   :					str   				=   list(A      )
   UpperCAmelCase__   :					int   				=   conv_bias
   UpperCAmelCase__   :					Union[str, Any]   				=   num_conv_pos_embeddings
   UpperCAmelCase__   :					Dict   				=   num_conv_pos_embedding_groups
   UpperCAmelCase__   :					Union[str, Any]   				=   len(self.conv_dim      )
   UpperCAmelCase__   :					Union[str, Any]   				=   num_hidden_layers
   UpperCAmelCase__   :					List[Any]   				=   intermediate_size
   UpperCAmelCase__   :					Tuple   				=   hidden_act
   UpperCAmelCase__   :					List[str]   				=   num_attention_heads
   UpperCAmelCase__   :					Any   				=   hidden_dropout
   UpperCAmelCase__   :					Optional[int]   				=   attention_dropout
   UpperCAmelCase__   :					Union[str, Any]   				=   activation_dropout
   UpperCAmelCase__   :					List[Any]   				=   feat_proj_layer_norm
   UpperCAmelCase__   :					Union[str, Any]   				=   feat_proj_dropout
   UpperCAmelCase__   :					Dict   				=   final_dropout
   UpperCAmelCase__   :					Any   				=   layerdrop
   UpperCAmelCase__   :					List[Any]   				=   layer_norm_eps
   UpperCAmelCase__   :					Union[str, Any]   				=   initializer_range
   UpperCAmelCase__   :					Tuple   				=   vocab_size
   UpperCAmelCase__   :					List[str]   				=   do_stable_layer_norm
   UpperCAmelCase__   :					str   				=   use_weighted_layer_sum
   UpperCAmelCase__   :					int   				=   classifier_proj_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)`, 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
   UpperCAmelCase__   :					List[str]   				=   apply_spec_augment
   UpperCAmelCase__   :					Union[str, Any]   				=   mask_time_prob
   UpperCAmelCase__   :					str   				=   mask_time_length
   UpperCAmelCase__   :					Union[str, Any]   				=   mask_time_min_masks
   UpperCAmelCase__   :					int   				=   mask_feature_prob
   UpperCAmelCase__   :					Union[str, Any]   				=   mask_feature_length
   UpperCAmelCase__   :					Tuple   				=   mask_feature_min_masks

   # ctc loss
   UpperCAmelCase__   :					str   				=   ctc_loss_reduction
   UpperCAmelCase__   :					List[str]   				=   ctc_zero_infinity




  @property
  def 				__lowercase    (					self						:     Dict      ):






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








"""simple docstring"""




from __future__ import annotations
def 					lowerCAmelCase  (   __UpperCamelCase							,      __UpperCamelCase							,      __UpperCamelCase							,      __UpperCamelCase ):
 '''simple docstring'''





 UpperCAmelCase__				, UpperCAmelCase__   :					Optional[Any]   				=   m - 1, 0
 while i >= 0 and j < n:
  if key == mat[i][j]:
   print(F"Key {key} found at row- {i + 1} column- {j + 1}" )
   return
  if key < mat[i][j]:
   i -= 1
  else:
   j += 1
 print(F"Key {key} not found" )
def 					lowerCAmelCase  (   ):
 '''simple docstring'''





 UpperCAmelCase__   :					Union[str, Any]   				=   [[2, 5, 7], [4, 8, 13], [9, 11, 15], [12, 17, 20]]
 UpperCAmelCase__   :					int   				=   int(input("""Enter the element to be searched:""" ) )
 print(__UpperCamelCase )
 search_in_a_sorted_matrix(__UpperCamelCase							,      len(__UpperCamelCase )							,      len(mat[0] )							,      __UpperCamelCase )


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      main()





