





import functools
import operator

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


_a 						=      logging.get_logger(__name__)

_a 						=      {
    "facebook/wav2vec2-base-960h": "https://huggingface.co/facebook/wav2vec2-base-960h/resolve/main/config.json",
    # See all Wav2Vec2 models at https://huggingface.co/models?filter=wav2vec2
}






class 					__A    (    lowerCAmelCase ):

			'''simple docstring'''







			lowerCAmelCase_							     =						"""wav2vec2"""





			def __init__(    self       ,  __lowerCAmelCase=3_2       ,  __lowerCAmelCase=7_6_8       ,  __lowerCAmelCase=1_2       ,  __lowerCAmelCase=1_2       ,  __lowerCAmelCase=3_0_7_2       ,  __lowerCAmelCase="gelu"       ,  __lowerCAmelCase=0.1       ,  __lowerCAmelCase=0.1       ,  __lowerCAmelCase=0.1       ,  __lowerCAmelCase=0.0       ,  __lowerCAmelCase=0.0       ,  __lowerCAmelCase=0.1       ,  __lowerCAmelCase=0.1       ,  __lowerCAmelCase=0.02       ,  __lowerCAmelCase=1E-5       ,  __lowerCAmelCase="group"       ,  __lowerCAmelCase="gelu"       ,  __lowerCAmelCase=(5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2, 5_1_2)       ,  __lowerCAmelCase=(5, 2, 2, 2, 2, 2, 2)       ,  __lowerCAmelCase=(1_0, 3, 3, 3, 3, 2, 2)       ,  __lowerCAmelCase=False       ,  __lowerCAmelCase=1_2_8       ,  __lowerCAmelCase=1_6       ,  __lowerCAmelCase=False       ,  __lowerCAmelCase=True       ,  __lowerCAmelCase=0.05       ,  __lowerCAmelCase=1_0       ,  __lowerCAmelCase=2       ,  __lowerCAmelCase=0.0       ,  __lowerCAmelCase=1_0       ,  __lowerCAmelCase=0       ,  __lowerCAmelCase=3_2_0       ,  __lowerCAmelCase=2       ,  __lowerCAmelCase=0.1       ,  __lowerCAmelCase=1_0_0       ,  __lowerCAmelCase=2_5_6       ,  __lowerCAmelCase=2_5_6       ,  __lowerCAmelCase=0.1       ,  __lowerCAmelCase="sum"       ,  __lowerCAmelCase=False       ,  __lowerCAmelCase=False       ,  __lowerCAmelCase=2_5_6       ,  __lowerCAmelCase=(5_1_2, 5_1_2, 5_1_2, 5_1_2, 1_5_0_0)       ,  __lowerCAmelCase=(5, 3, 3, 1, 1)       ,  __lowerCAmelCase=(1, 2, 3, 1, 1)       ,  __lowerCAmelCase=5_1_2       ,  __lowerCAmelCase=0       ,  __lowerCAmelCase=1       ,  __lowerCAmelCase=2       ,  __lowerCAmelCase=False       ,  __lowerCAmelCase=3       ,  __lowerCAmelCase=2       ,  __lowerCAmelCase=3       ,  __lowerCAmelCase=None       ,  __lowerCAmelCase=None       ,  **__lowerCAmelCase       ,  ):



				'''simple docstring'''







				super().__init__(**__lowerCAmelCase       ,  pad_token_id=__lowerCAmelCase       ,  bos_token_id=__lowerCAmelCase       ,  eos_token_id=__lowerCAmelCase							)
				lowerCamelCase__								=		hidden_size
				lowerCamelCase__								=		feat_extract_norm
				lowerCamelCase__								=		feat_extract_activation
				lowerCamelCase__								=		list(__lowerCAmelCase							)
				lowerCamelCase__								=		list(__lowerCAmelCase							)
				lowerCamelCase__								=		list(__lowerCAmelCase							)
				lowerCamelCase__								=		conv_bias
				lowerCamelCase__								=		num_conv_pos_embeddings
				lowerCamelCase__								=		num_conv_pos_embedding_groups
				lowerCamelCase__								=		len(self.conv_dim							)
				lowerCamelCase__								=		num_hidden_layers
				lowerCamelCase__								=		intermediate_size
				lowerCamelCase__								=		hidden_act
				lowerCamelCase__								=		num_attention_heads
				lowerCamelCase__								=		hidden_dropout
				lowerCamelCase__								=		attention_dropout
				lowerCamelCase__								=		activation_dropout
				lowerCamelCase__								=		feat_proj_dropout
				lowerCamelCase__								=		final_dropout
				lowerCamelCase__								=		layerdrop
				lowerCamelCase__								=		layer_norm_eps
				lowerCamelCase__								=		initializer_range
				lowerCamelCase__								=		vocab_size
				lowerCamelCase__								=		do_stable_layer_norm
				lowerCamelCase__								=		use_weighted_layer_sum

				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
				lowerCamelCase__								=		apply_spec_augment
				lowerCamelCase__								=		mask_time_prob
				lowerCamelCase__								=		mask_time_length
				lowerCamelCase__								=		mask_time_min_masks
				lowerCamelCase__								=		mask_feature_prob
				lowerCamelCase__								=		mask_feature_length
				lowerCamelCase__								=		mask_feature_min_masks

				# parameters for pretraining with codevector quantized representations
				lowerCamelCase__								=		num_codevectors_per_group
				lowerCamelCase__								=		num_codevector_groups
				lowerCamelCase__								=		contrastive_logits_temperature
				lowerCamelCase__								=		feat_quantizer_dropout
				lowerCamelCase__								=		num_negatives
				lowerCamelCase__								=		codevector_dim
				lowerCamelCase__								=		proj_codevector_dim
				lowerCamelCase__								=		diversity_loss_weight

				# ctc loss
				lowerCamelCase__								=		ctc_loss_reduction
				lowerCamelCase__								=		ctc_zero_infinity

				# adapter
				lowerCamelCase__								=		add_adapter
				lowerCamelCase__								=		adapter_kernel_size
				lowerCamelCase__								=		adapter_stride
				lowerCamelCase__								=		num_adapter_layers
				lowerCamelCase__								=		output_hidden_size or hidden_size
				lowerCamelCase__								=		adapter_attn_dim

				# SequenceClassification-specific parameter. Feel free to ignore for other classes.
				lowerCamelCase__								=		classifier_proj_size

				# XVector-specific parameters. Feel free to ignore for other classes.
				lowerCamelCase__								=		list(__lowerCAmelCase							)
				lowerCamelCase__								=		list(__lowerCAmelCase							)
				lowerCamelCase__								=		list(__lowerCAmelCase							)
				lowerCamelCase__								=		xvector_output_dim





			@property
			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







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










def lowerCAmelCase__(__snake_case							)				->      list:







	'''simple docstring'''







	lowerCamelCase__								=		len(__snake_case							)
	for _ in range(__snake_case							):
		for i in range(_ % 2       ,arr_size - 1       ,2							):
			if arr[i + 1] < arr[i]:
				lowerCamelCase__				,	lowerCamelCase__								=		arr[i + 1], arr[i]

	return arr


if __name__ == "__main__":
			_a 						=      list(range(10, 0, -1))
			print(f"""Original: {arr}. Sorted: {odd_even_transposition(arr)}""")



