






import functools
import operator

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


A_		:		str		     =			logging.get_logger(__name__)

A_		:		Optional[Any]		     =			{
    '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(	UpperCAmelCase_ ):





       """simple docstring"""







       a    :		Union[str, Any]									='''sew-d'''





       def __init__( self  ,      _lowerCamelCase=3_2  ,      _lowerCamelCase=7_6_8  ,      _lowerCamelCase=1_2  ,      _lowerCamelCase=1_2  ,      _lowerCamelCase=3_0_7_2  ,      _lowerCamelCase=2  ,      _lowerCamelCase=5_1_2  ,      _lowerCamelCase=2_5_6  ,      _lowerCamelCase=True  ,      _lowerCamelCase=True  ,      _lowerCamelCase=("p2c", "c2p")  ,      _lowerCamelCase="layer_norm"  ,      _lowerCamelCase="gelu_python"  ,      _lowerCamelCase=0.1  ,      _lowerCamelCase=0.1  ,      _lowerCamelCase=0.1  ,      _lowerCamelCase=0.0  ,      _lowerCamelCase=0.1  ,      _lowerCamelCase=0.0_2  ,      _lowerCamelCase=1e-7  ,      _lowerCamelCase=1e-5  ,      _lowerCamelCase="group"  ,      _lowerCamelCase="gelu"  ,      _lowerCamelCase=(6_4, 1_2_8, 1_2_8, 1_2_8, 1_2_8, 2_5_6, 2_5_6, 2_5_6, 2_5_6, 5_1_2, 5_1_2, 5_1_2, 5_1_2)  ,      _lowerCamelCase=(5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1)  ,      _lowerCamelCase=(1_0, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1)  ,      _lowerCamelCase=False  ,      _lowerCamelCase=1_2_8  ,      _lowerCamelCase=1_6  ,      _lowerCamelCase=True  ,      _lowerCamelCase=0.0_5  ,      _lowerCamelCase=1_0  ,      _lowerCamelCase=2  ,      _lowerCamelCase=0.0  ,      _lowerCamelCase=1_0  ,      _lowerCamelCase=0  ,      _lowerCamelCase="mean"  ,      _lowerCamelCase=False  ,      _lowerCamelCase=False  ,      _lowerCamelCase=2_5_6  ,      _lowerCamelCase=0  ,      _lowerCamelCase=1  ,      _lowerCamelCase=2  ,      **_lowerCamelCase  ,      ):
         super().__init__(**_lowerCamelCase  ,      pad_token_id=_lowerCamelCase  ,      bos_token_id=_lowerCamelCase  ,      eos_token_id=_lowerCamelCase							)
         UpperCamelCase_: Optional[int]   				=    hidden_size
         UpperCamelCase_: List[str]   				=    feat_extract_norm
         UpperCamelCase_: int   				=    feat_extract_activation
         UpperCamelCase_: Optional[int]   				=    list(_lowerCamelCase							)
         UpperCamelCase_: str   				=    list(_lowerCamelCase							)
         UpperCamelCase_: Optional[Any]   				=    list(_lowerCamelCase							)
         UpperCamelCase_: Optional[int]   				=    conv_bias
         UpperCamelCase_: Dict   				=    num_conv_pos_embeddings
         UpperCamelCase_: List[Any]   				=    num_conv_pos_embedding_groups
         UpperCamelCase_: str   				=    len(self.conv_dim							)
         UpperCamelCase_: str   				=    num_hidden_layers
         UpperCamelCase_: List[str]   				=    intermediate_size
         UpperCamelCase_: Any   				=    squeeze_factor
         UpperCamelCase_: List[Any]   				=    max_position_embeddings
         UpperCamelCase_: Any   				=    position_buckets
         UpperCamelCase_: Union[str, Any]   				=    share_att_key
         UpperCamelCase_: Optional[int]   				=    relative_attention
         UpperCamelCase_: List[Any]   				=    norm_rel_ebd
         UpperCamelCase_: Tuple   				=    list(_lowerCamelCase							)
         UpperCamelCase_: Optional[Any]   				=    hidden_act
         UpperCamelCase_: Dict   				=    num_attention_heads
         UpperCamelCase_: Optional[Any]   				=    hidden_dropout
         UpperCamelCase_: int   				=    attention_dropout
         UpperCamelCase_: Tuple   				=    activation_dropout
         UpperCamelCase_: List[Any]   				=    feat_proj_dropout
         UpperCamelCase_: Optional[int]   				=    final_dropout
         UpperCamelCase_: str   				=    layer_norm_eps
         UpperCamelCase_: Dict   				=    feature_layer_norm_eps
         UpperCamelCase_: Optional[Any]   				=    initializer_range
         UpperCamelCase_: Tuple   				=    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_: List[Any]   				=    apply_spec_augment
         UpperCamelCase_: str   				=    mask_time_prob
         UpperCamelCase_: str   				=    mask_time_length
         UpperCamelCase_: Tuple   				=    mask_time_min_masks
         UpperCamelCase_: str   				=    mask_feature_prob
         UpperCamelCase_: List[Any]   				=    mask_feature_length
         UpperCamelCase_: List[Any]   				=    mask_feature_min_masks

         # ctc loss
         UpperCamelCase_: List[Any]   				=    ctc_loss_reduction
         UpperCamelCase_: Dict   				=    ctc_zero_infinity

         # sequence classification
         UpperCamelCase_: Dict   				=    use_weighted_layer_sum
         UpperCamelCase_: str   				=    classifier_proj_size





       @property
       def       _a   ( self							):
         return functools.reduce(operator.mul  ,      self.conv_stride  ,      1							)







def   snake_case (UpperCAmelCase__     ,   UpperCAmelCase__  )	->    int:
  while b:
    UpperCamelCase_				,UpperCamelCase_: int   				=    b, a % b
  return a

def   snake_case (UpperCAmelCase__     ,   UpperCAmelCase__  )	->    int:
  return a if b == 0 else euclidean_gcd_recursive(UpperCAmelCase__     ,   a % b  )

def   snake_case ()	->    int:
  print(F'''euclidean_gcd(3, 5) = {euclidean_gcd(3     ,   5  )}'''  )
  print(F'''euclidean_gcd(5, 3) = {euclidean_gcd(5     ,   3  )}'''  )
  print(F'''euclidean_gcd(1, 3) = {euclidean_gcd(1     ,   3  )}'''  )
  print(F'''euclidean_gcd(3, 6) = {euclidean_gcd(3     ,   6  )}'''  )
  print(F'''euclidean_gcd(6, 3) = {euclidean_gcd(6     ,   3  )}'''  )

  print(F'''euclidean_gcd_recursive(3, 5) = {euclidean_gcd_recursive(3     ,   5  )}'''  )
  print(F'''euclidean_gcd_recursive(5, 3) = {euclidean_gcd_recursive(5     ,   3  )}'''  )
  print(F'''euclidean_gcd_recursive(1, 3) = {euclidean_gcd_recursive(1     ,   3  )}'''  )
  print(F'''euclidean_gcd_recursive(3, 6) = {euclidean_gcd_recursive(3     ,   6  )}'''  )
  print(F'''euclidean_gcd_recursive(6, 3) = {euclidean_gcd_recursive(6     ,   3  )}'''  )


if __name__ == "__main__":
   main()