






"""simple docstring"""



from string import ascii_uppercase

A__			:							Tuple					   =   {str(ord(c) - 55): c for c in ascii_uppercase}

def 					_snake_case							(	lowerCamelCase__      :       int							,		lowerCamelCase__      :       int    )							->      str:




							if isinstance(lowerCamelCase__							,		lowerCamelCase__    ):
														raise TypeError("int() can\'t convert non-string with explicit base"    )
							if num < 0:
														raise ValueError("parameter must be positive int"    )
							if isinstance(lowerCamelCase__							,		lowerCamelCase__    ):
														raise TypeError("\'str\' object cannot be interpreted as an integer"    )
							if isinstance(lowerCamelCase__							,		lowerCamelCase__    ):
														raise TypeError("\'float\' object cannot be interpreted as an integer"    )
							if base in (0, 1):
														raise ValueError("base must be >= 2"    )
							if base > 36:
														raise ValueError("base must be <= 36"    )
							lowerCamelCase_			:				Optional[Any]										=""
							lowerCamelCase_			:				List[Any]										=0
							lowerCamelCase_			:				List[Any]										=0
							while div != 1:
														lowerCamelCase_				,		lowerCamelCase_			:				Dict										=divmod(lowerCamelCase__							,		lowerCamelCase__    )
														if base >= 11 and 9 < mod < 36:
																					lowerCamelCase_			:				Dict										=ALPHABET_VALUES[str(lowerCamelCase__    )]
														else:
																					lowerCamelCase_			:				Optional[int]										=str(lowerCamelCase__    )
														new_value += actual_value
														lowerCamelCase_			:				Tuple										=num // base
														lowerCamelCase_			:				str										=div
														if div == 0:
																					return str(new_value[::-1]    )
														elif div == 1:
																					new_value += str(lowerCamelCase__    )
																					return str(new_value[::-1]    )

							return new_value[::-1]


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						for base in range(2, 37):
												for num in range(1_000):
																		assert int(decimal_to_any(num, base), base) == num, (
																		    num,
																		    base,
																		    decimal_to_any(num, base),
																		    int(decimal_to_any(num, base), base),
																		)





"""simple docstring"""

import functools
import operator

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


SCREAMING_SNAKE_CASE_            =    logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_            =    {
    '''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   _UpperCAmelCase				(		SCREAMING_SNAKE_CASE_				):
      __SCREAMING_SNAKE_CASE :				List[str]				   =						"sew-d"




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

          # ctc loss
          UpperCAmelCase          =       ctc_loss_reduction
          UpperCAmelCase          =       ctc_zero_infinity

          # sequence classification
          UpperCAmelCase          =       use_weighted_layer_sum
          UpperCAmelCase          =       classifier_proj_size




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



