

"""simple docstring"""






import functools
import operator

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


snake_case_   :   Dict        =       logging.get_logger(__name__)

snake_case_   :   List[Any]        =       {
    """asapp/sew-tiny-100k""": """https://huggingface.co/asapp/sew-tiny-100k/resolve/main/config.json""",
    # See all SEW models at https://huggingface.co/models?filter=sew
}







class       snake_case__  ( lowerCAmelCase_     ):
			SCREAMING_SNAKE_CASE__     				=						'''sew'''







			def __init__(			self			: Dict			,  lowercase			: List[Any]=32			,  lowercase			: Tuple=7_68			,  lowercase			: str=12			,  lowercase			: List[str]=12			,  lowercase			: str=30_72			,  lowercase			: int=2			,  lowercase			: str="gelu"			,  lowercase			: str=0.1			,  lowercase			: Union[str, Any]=0.1			,  lowercase			: Optional[int]=0.1			,  lowercase			: Dict=0.0			,  lowercase			: List[Any]=0.1			,  lowercase			: Optional[int]=0.1			,  lowercase			: Union[str, Any]=0.0_2			,  lowercase			: Tuple=1E-5			,  lowercase			: int="group"			,  lowercase			: str="gelu"			,  lowercase			: List[Any]=(64, 1_28, 1_28, 1_28, 1_28, 2_56, 2_56, 2_56, 2_56, 5_12, 5_12, 5_12, 5_12)			,  lowercase			: Optional[int]=(5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1)			,  lowercase			: Optional[int]=(10, 3, 1, 3, 1, 3, 1, 3, 1, 2, 1, 2, 1)			,  lowercase			: Optional[Any]=False			,  lowercase			: int=1_28			,  lowercase			: Union[str, Any]=16			,  lowercase			: Any=True			,  lowercase			: int=0.0_5			,  lowercase			: Any=10			,  lowercase			: Dict=2			,  lowercase			: Optional[int]=0.0			,  lowercase			: Optional[Any]=10			,  lowercase			: Any=0			,  lowercase			: int="mean"			,  lowercase			: List[Any]=False			,  lowercase			: Optional[Any]=False			,  lowercase			: List[str]=2_56			,  lowercase			: List[Any]=0			,  lowercase			: Optional[int]=1			,  lowercase			: Any=2			,  **lowercase			: Optional[int]			,  ):





								'''simple docstring'''



								super().__init__(**lowercase			,  pad_token_id=lowercase			,  bos_token_id=lowercase			,  eos_token_id=lowercase  )
								UpperCAmelCase			:   Optional[int]      =				hidden_size
								UpperCAmelCase			:   Union[str, Any]      =				feat_extract_norm
								UpperCAmelCase			:   List[str]      =				feat_extract_activation
								UpperCAmelCase			:   int      =				list(lowercase  )
								UpperCAmelCase			:   List[Any]      =				list(lowercase  )
								UpperCAmelCase			:   Optional[Any]      =				list(lowercase  )
								UpperCAmelCase			:   Union[str, Any]      =				conv_bias
								UpperCAmelCase			:   List[Any]      =				num_conv_pos_embeddings
								UpperCAmelCase			:   Union[str, Any]      =				num_conv_pos_embedding_groups
								UpperCAmelCase			:   Tuple      =				len(self.conv_dim  )
								UpperCAmelCase			:   str      =				num_hidden_layers
								UpperCAmelCase			:   str      =				intermediate_size
								UpperCAmelCase			:   Union[str, Any]      =				squeeze_factor
								UpperCAmelCase			:   int      =				hidden_act
								UpperCAmelCase			:   int      =				num_attention_heads
								UpperCAmelCase			:   List[str]      =				hidden_dropout
								UpperCAmelCase			:   str      =				attention_dropout
								UpperCAmelCase			:   Union[str, Any]      =				activation_dropout
								UpperCAmelCase			:   List[str]      =				feat_proj_dropout
								UpperCAmelCase			:   Optional[Any]      =				final_dropout
								UpperCAmelCase			:   List[str]      =				layerdrop
								UpperCAmelCase			:   str      =				layer_norm_eps
								UpperCAmelCase			:   Optional[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			:   List[str]      =				apply_spec_augment
								UpperCAmelCase			:   List[str]      =				mask_time_prob
								UpperCAmelCase			:   Optional[Any]      =				mask_time_length
								UpperCAmelCase			:   List[Any]      =				mask_time_min_masks
								UpperCAmelCase			:   Union[str, Any]      =				mask_feature_prob
								UpperCAmelCase			:   Dict      =				mask_feature_length
								UpperCAmelCase			:   Dict      =				mask_feature_min_masks

								# ctc loss
								UpperCAmelCase			:   Tuple      =				ctc_loss_reduction
								UpperCAmelCase			:   Optional[Any]      =				ctc_zero_infinity

								# sequence classification
								UpperCAmelCase			:   Any      =				use_weighted_layer_sum
								UpperCAmelCase			:   Tuple      =				classifier_proj_size







			@property
			def 			__lowerCAmelCase				(			self			: Dict  ):





								'''simple docstring'''



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





"""simple docstring"""






def   lowercase_	(    _lowercase       :		int							,      _lowercase       :		int	):




					'''simple docstring'''






					return int(input_a == input_a == 0	)



def   lowercase_	(    ):




					'''simple docstring'''






					print("Truth Table of NOR Gate:"	)
					print("|   Input 1   |  Input 2  | Output |"	)
					print(F"""|      0      |    0      |  {nor_gate(0							,      0	)}     |"""	)
					print(F"""|      0      |    1      |  {nor_gate(0							,      1	)}     |"""	)
					print(F"""|      1      |    0      |  {nor_gate(1							,      0	)}     |"""	)
					print(F"""|      1      |    1      |  {nor_gate(1							,      1	)}     |"""	)


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	main()


