



import functools
import operator

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


__UpperCAmelCase          =       logging.get_logger(__name__)

__UpperCAmelCase          =       {
    '''asapp/sew-d-tiny-100k''': '''https://huggingface.co/asapp/sew-d-tiny-100k/resolve/main/config.json''',
    # See all SEW-D models at https://huggingface.co/models?filter=sew-d
}



class 				lowerCAmelCase_		(  snake_case_							):
       UpperCAmelCase__				:					List[Any]        =  '''sew-d'''
       def __init__(			self,			SCREAMING_SNAKE_CASE_=32,			SCREAMING_SNAKE_CASE_=768,			SCREAMING_SNAKE_CASE_=12,			SCREAMING_SNAKE_CASE_=12,			SCREAMING_SNAKE_CASE_=3072,			SCREAMING_SNAKE_CASE_=2,			SCREAMING_SNAKE_CASE_=512,			SCREAMING_SNAKE_CASE_=256,			SCREAMING_SNAKE_CASE_=True,			SCREAMING_SNAKE_CASE_=True,			SCREAMING_SNAKE_CASE_=("p2c", "c2p"),			SCREAMING_SNAKE_CASE_="layer_norm",			SCREAMING_SNAKE_CASE_="gelu_python",			SCREAMING_SNAKE_CASE_=0.1,			SCREAMING_SNAKE_CASE_=0.1,			SCREAMING_SNAKE_CASE_=0.1,			SCREAMING_SNAKE_CASE_=0.0,			SCREAMING_SNAKE_CASE_=0.1,			SCREAMING_SNAKE_CASE_=0.02,			SCREAMING_SNAKE_CASE_=1e-7,			SCREAMING_SNAKE_CASE_=1e-5,			SCREAMING_SNAKE_CASE_="group",			SCREAMING_SNAKE_CASE_="gelu",			SCREAMING_SNAKE_CASE_=(64, 128, 128, 128, 128, 256, 256, 256, 256, 512, 512, 512, 512),			SCREAMING_SNAKE_CASE_=(5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1),			SCREAMING_SNAKE_CASE_=(10, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1),			SCREAMING_SNAKE_CASE_=False,			SCREAMING_SNAKE_CASE_=128,			SCREAMING_SNAKE_CASE_=16,			SCREAMING_SNAKE_CASE_=True,			SCREAMING_SNAKE_CASE_=0.05,			SCREAMING_SNAKE_CASE_=10,			SCREAMING_SNAKE_CASE_=2,			SCREAMING_SNAKE_CASE_=0.0,			SCREAMING_SNAKE_CASE_=10,			SCREAMING_SNAKE_CASE_=0,			SCREAMING_SNAKE_CASE_="mean",			SCREAMING_SNAKE_CASE_=False,			SCREAMING_SNAKE_CASE_=False,			SCREAMING_SNAKE_CASE_=256,			SCREAMING_SNAKE_CASE_=0,			SCREAMING_SNAKE_CASE_=1,			SCREAMING_SNAKE_CASE_=2,			**SCREAMING_SNAKE_CASE_,			)     ->		str:
          super().__init__(**UpperCamelCase__,			pad_token_id=UpperCamelCase__,			bos_token_id=UpperCamelCase__,			eos_token_id=UpperCamelCase__       )
          UpperCamelCase    :  Tuple							=	hidden_size
          UpperCamelCase    :  Dict							=	feat_extract_norm
          UpperCamelCase    :  Optional[int]							=	feat_extract_activation
          UpperCamelCase    :  List[str]							=	list(UpperCamelCase__       )
          UpperCamelCase    :  Any							=	list(UpperCamelCase__       )
          UpperCamelCase    :  Any							=	list(UpperCamelCase__       )
          UpperCamelCase    :  Tuple							=	conv_bias
          UpperCamelCase    :  int							=	num_conv_pos_embeddings
          UpperCamelCase    :  Any							=	num_conv_pos_embedding_groups
          UpperCamelCase    :  Optional[int]							=	len(self.conv_dim       )
          UpperCamelCase    :  Optional[Any]							=	num_hidden_layers
          UpperCamelCase    :  List[Any]							=	intermediate_size
          UpperCamelCase    :  str							=	squeeze_factor
          UpperCamelCase    :  Tuple							=	max_position_embeddings
          UpperCamelCase    :  Optional[int]							=	position_buckets
          UpperCamelCase    :  List[Any]							=	share_att_key
          UpperCamelCase    :  int							=	relative_attention
          UpperCamelCase    :  Any							=	norm_rel_ebd
          UpperCamelCase    :  Optional[Any]							=	list(UpperCamelCase__       )
          UpperCamelCase    :  Optional[int]							=	hidden_act
          UpperCamelCase    :  int							=	num_attention_heads
          UpperCamelCase    :  Optional[Any]							=	hidden_dropout
          UpperCamelCase    :  List[Any]							=	attention_dropout
          UpperCamelCase    :  Any							=	activation_dropout
          UpperCamelCase    :  Union[str, Any]							=	feat_proj_dropout
          UpperCamelCase    :  str							=	final_dropout
          UpperCamelCase    :  Optional[Any]							=	layer_norm_eps
          UpperCamelCase    :  str							=	feature_layer_norm_eps
          UpperCamelCase    :  int							=	initializer_range
          UpperCamelCase    :  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
          UpperCamelCase    :  Optional[int]							=	apply_spec_augment
          UpperCamelCase    :  Tuple							=	mask_time_prob
          UpperCamelCase    :  Optional[int]							=	mask_time_length
          UpperCamelCase    :  List[str]							=	mask_time_min_masks
          UpperCamelCase    :  List[str]							=	mask_feature_prob
          UpperCamelCase    :  Dict							=	mask_feature_length
          UpperCamelCase    :  List[Any]							=	mask_feature_min_masks

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

          # sequence classification
          UpperCamelCase    :  Any							=	use_weighted_layer_sum
          UpperCamelCase    :  Optional[Any]							=	classifier_proj_size






       @property
       def 					snake_case_       (			self       )     ->		List[Any]:
          return functools.reduce(operator.mul,			self.conv_stride,			1       )







"""simple docstring"""



def   __lowerCAmelCase						(						lowercase  :  List[str]						,							lowercase  :  Union[str, Any]						,							lowercase  :  List[str]						,							lowercase  :  Tuple						,							lowercase  :  List[Any]						,							lowercase  :  int )	->						List[Any]:


    """simple docstring"""





    if index == r:
        for j in range(lowercase ):
            print(data[j]						,							end=" " )
        print(" " )
        return
    #  When no more elements are there to put in data[]
    if i >= n:
        return
    # current is included, put next at next location
    snake_case    :      Union[str, Any]      					=    arr[i]
    combination_util(lowercase						,							lowercase						,							lowercase						,							index + 1						,							lowercase						,							i + 1 )
    # current is excluded, replace it with
    # next (Note that i+1 is passed, but
    # index is not changed)
    combination_util(lowercase						,							lowercase						,							lowercase						,							lowercase						,							lowercase						,							i + 1 )
    # The main function that prints all combinations
    # of size r in arr[] of size n. This function
    # mainly uses combinationUtil()







def   __lowerCAmelCase						(						lowercase  :  Any						,							lowercase  :  Union[str, Any]						,							lowercase  :  Optional[int] )	->						List[Any]:


    """simple docstring"""





    snake_case    :      Any      					=    [0] * r
    # Print all combination using temporary array 'data[]'
    combination_util(lowercase						,							lowercase						,							lowercase						,							0						,							lowercase						,							0 )


if __name__ == "__main__":
  # Driver code to check the function above
  __snake_case   			=    [10, 20, 30, 40, 50]
  print_combination(arr, len(arr), 3)
  # This code is contributed by Ambuj sahu





