





import math
from dataclasses import dataclass
from typing import Optional, Tuple, Union

import numpy as np
import torch

from ..configuration_utils import ConfigMixin, register_to_config
from ..utils import BaseOutput, randn_tensor
from .scheduling_utils import SchedulerMixin






@dataclass
# Copied from diffusers.schedulers.scheduling_ddpm.DDPMSchedulerOutput with DDPM->UnCLIP
class 					__A    (    lowerCAmelCase ):

			'''simple docstring'''







			lowerCAmelCase_							     =						42
			lowerCAmelCase_							     =						None





def lowerCAmelCase__(__snake_case       ,__snake_case=0.9_9_9       ,__snake_case="cosine"       ,)				->      Tuple:







	'''simple docstring'''







	if alpha_transform_type == "cosine":

		def alpha_bar_fn(__snake_case							):
			return math.cos((t + 0.0_0_8) / 1.0_0_8 * math.pi / 2							) ** 2

	elif alpha_transform_type == "exp":

		def alpha_bar_fn(__snake_case							):
			return math.exp(t * -1_2.0							)

	else:
		raise ValueError(F'Unsupported alpha_tranform_type: {alpha_transform_type}'							)

	lowerCamelCase__								=		[]
	for i in range(__snake_case							):
		lowerCamelCase__								=		i / num_diffusion_timesteps
		lowerCamelCase__								=		(i + 1) / num_diffusion_timesteps
		betas.append(min(1 - alpha_bar_fn(__snake_case							) / alpha_bar_fn(__snake_case							)       ,__snake_case							)							)
	return torch.tensor(__snake_case       ,dtype=torch.floataa							)






class 					__A    (    lowerCAmelCase			,				lowerCAmelCase ):

			'''simple docstring'''







			@register_to_config
			def __init__(    self       ,  __lowerCAmelCase = 1_0_0_0       ,  __lowerCAmelCase = "fixed_small_log"       ,  __lowerCAmelCase = True       ,  __lowerCAmelCase = 1.0       ,  __lowerCAmelCase = "epsilon"       ,  __lowerCAmelCase = "squaredcos_cap_v2"       ,  ):



				'''simple docstring'''







				if beta_schedule != "squaredcos_cap_v2":
					raise ValueError('''UnCLIPScheduler only supports `beta_schedule`: \'squaredcos_cap_v2\''''							)

				lowerCamelCase__								=		betas_for_alpha_bar(__lowerCAmelCase							)

				lowerCamelCase__								=		1.0 - self.betas
				lowerCamelCase__								=		torch.cumprod(self.alphas       ,  dim=0							)
				lowerCamelCase__								=		torch.tensor(1.0							)

				# standard deviation of the initial noise distribution
				lowerCamelCase__								=		1.0

				# setable values
				lowerCamelCase__								=		None
				lowerCamelCase__								=		torch.from_numpy(np.arange(0       ,  __lowerCAmelCase							)[::-1].copy()							)

				lowerCamelCase__								=		variance_type





			def 		__lowerCamelCase				(    self       ,  __lowerCAmelCase       ,  __lowerCAmelCase = None							):



				'''simple docstring'''







				return sample





			def 		__lowerCamelCase				(    self       ,  __lowerCAmelCase       ,  __lowerCAmelCase = None							):



				'''simple docstring'''







				lowerCamelCase__								=		num_inference_steps
				lowerCamelCase__								=		(self.config.num_train_timesteps - 1) / (self.num_inference_steps - 1)
				lowerCamelCase__								=		(np.arange(0       ,  __lowerCAmelCase							) * step_ratio).round()[::-1].copy().astype(np.intaa							)
				lowerCamelCase__								=		torch.from_numpy(__lowerCAmelCase							).to(__lowerCAmelCase							)





			def 		__lowerCamelCase				(    self       ,  __lowerCAmelCase       ,  __lowerCAmelCase=None       ,  __lowerCAmelCase=None       ,  __lowerCAmelCase=None							):



				'''simple docstring'''







				if prev_timestep is None:
					lowerCamelCase__								=		t - 1

				lowerCamelCase__								=		self.alphas_cumprod[t]
				lowerCamelCase__								=		self.alphas_cumprod[prev_timestep] if prev_timestep >= 0 else self.one
				lowerCamelCase__								=		1 - alpha_prod_t
				lowerCamelCase__								=		1 - alpha_prod_t_prev

				if prev_timestep == t - 1:
					lowerCamelCase__								=		self.betas[t]
				else:
					lowerCamelCase__								=		1 - alpha_prod_t / alpha_prod_t_prev

				# For t > 0, compute predicted variance βt (see formula (6) and (7) from https://arxiv.org/pdf/2006.11239.pdf)
				# and sample from it to get previous sample
				# x_{t-1} ~ N(pred_prev_sample, variance) == add variance to pred_sample
				lowerCamelCase__								=		beta_prod_t_prev / beta_prod_t * beta

				if variance_type is None:
					lowerCamelCase__								=		self.config.variance_type

				# hacks - were probably added for training stability
				if variance_type == "fixed_small_log":
					lowerCamelCase__								=		torch.log(torch.clamp(__lowerCAmelCase       ,  min=1E-20							)							)
					lowerCamelCase__								=		torch.exp(0.5 * variance							)
				elif variance_type == "learned_range":
					# NOTE difference with DDPM scheduler
					lowerCamelCase__								=		variance.log()
					lowerCamelCase__								=		beta.log()

					lowerCamelCase__								=		(predicted_variance + 1) / 2
					lowerCamelCase__								=		frac * max_log + (1 - frac) * min_log

				return variance





			def 		__lowerCamelCase				(    self       ,  __lowerCAmelCase       ,  __lowerCAmelCase       ,  __lowerCAmelCase       ,  __lowerCAmelCase = None       ,  __lowerCAmelCase=None       ,  __lowerCAmelCase = True       ,  ):



				'''simple docstring'''







				lowerCamelCase__								=		timestep

				if model_output.shape[1] == sample.shape[1] * 2 and self.variance_type == "learned_range":
					lowerCamelCase__				,	lowerCamelCase__								=		torch.split(__lowerCAmelCase       ,  sample.shape[1]       ,  dim=1							)
				else:
					lowerCamelCase__								=		None

				# 1. compute alphas, betas
				if prev_timestep is None:
					lowerCamelCase__								=		t - 1

				lowerCamelCase__								=		self.alphas_cumprod[t]
				lowerCamelCase__								=		self.alphas_cumprod[prev_timestep] if prev_timestep >= 0 else self.one
				lowerCamelCase__								=		1 - alpha_prod_t
				lowerCamelCase__								=		1 - alpha_prod_t_prev

				if prev_timestep == t - 1:
					lowerCamelCase__								=		self.betas[t]
					lowerCamelCase__								=		self.alphas[t]
				else:
					lowerCamelCase__								=		1 - alpha_prod_t / alpha_prod_t_prev
					lowerCamelCase__								=		1 - beta

				# 2. compute predicted original sample from predicted noise also called
				# "predicted x_0" of formula (15) from https://arxiv.org/pdf/2006.11239.pdf
				if self.config.prediction_type == "epsilon":
					lowerCamelCase__								=		(sample - beta_prod_t ** 0.5 * model_output) / alpha_prod_t ** 0.5
				elif self.config.prediction_type == "sample":
					lowerCamelCase__								=		model_output
				else:
					raise ValueError(
					    F'prediction_type given as {self.config.prediction_type} must be one of `epsilon` or `sample`'
					    ''' for the UnCLIPScheduler.'''							)

				# 3. Clip "predicted x_0"
				if self.config.clip_sample:
					lowerCamelCase__								=		torch.clamp(
					    __lowerCAmelCase       ,  -self.config.clip_sample_range       ,  self.config.clip_sample_range							)

				# 4. Compute coefficients for pred_original_sample x_0 and current sample x_t
				# See formula (7) from https://arxiv.org/pdf/2006.11239.pdf
				lowerCamelCase__								=		(alpha_prod_t_prev ** 0.5 * beta) / beta_prod_t
				lowerCamelCase__								=		alpha ** 0.5 * beta_prod_t_prev / beta_prod_t

				# 5. Compute predicted previous sample µ_t
				# See formula (7) from https://arxiv.org/pdf/2006.11239.pdf
				lowerCamelCase__								=		pred_original_sample_coeff * pred_original_sample + current_sample_coeff * sample

				# 6. Add noise
				lowerCamelCase__								=		0
				if t > 0:
					lowerCamelCase__								=		randn_tensor(
					    model_output.shape       ,  dtype=model_output.dtype       ,  generator=__lowerCAmelCase       ,  device=model_output.device							)

					lowerCamelCase__								=		self._get_variance(
					    __lowerCAmelCase       ,  predicted_variance=__lowerCAmelCase       ,  prev_timestep=__lowerCAmelCase       ,  )

					if self.variance_type == "fixed_small_log":
						lowerCamelCase__								=		variance
					elif self.variance_type == "learned_range":
						lowerCamelCase__								=		(0.5 * variance).exp()
					else:
						raise ValueError(
						    F'variance_type given as {self.variance_type} must be one of `fixed_small_log` or `learned_range`'
						    ''' for the UnCLIPScheduler.'''							)

					lowerCamelCase__								=		variance * variance_noise

				lowerCamelCase__								=		pred_prev_sample + variance

				if not return_dict:
					return (pred_prev_sample,)

				return UnCLIPSchedulerOutput(prev_sample=__lowerCAmelCase       ,  pred_original_sample=__lowerCAmelCase							)





			def 		__lowerCamelCase				(    self       ,  __lowerCAmelCase       ,  __lowerCAmelCase       ,  __lowerCAmelCase       ,  ):



				'''simple docstring'''







				lowerCamelCase__								=		self.alphas_cumprod.to(device=original_samples.device       ,  dtype=original_samples.dtype							)
				lowerCamelCase__								=		timesteps.to(original_samples.device							)

				lowerCamelCase__								=		alphas_cumprod[timesteps] ** 0.5
				lowerCamelCase__								=		sqrt_alpha_prod.flatten()
				while len(sqrt_alpha_prod.shape							) < len(original_samples.shape							):
					lowerCamelCase__								=		sqrt_alpha_prod.unsqueeze(-1							)

				lowerCamelCase__								=		(1 - alphas_cumprod[timesteps]) ** 0.5
				lowerCamelCase__								=		sqrt_one_minus_alpha_prod.flatten()
				while len(sqrt_one_minus_alpha_prod.shape							) < len(original_samples.shape							):
					lowerCamelCase__								=		sqrt_one_minus_alpha_prod.unsqueeze(-1							)

				lowerCamelCase__								=		sqrt_alpha_prod * original_samples + sqrt_one_minus_alpha_prod * noise
				return noisy_samples










import itertools
import random
import unittest

import numpy as np

from transformers import is_speech_available
from transformers.testing_utils import require_torch, require_torchaudio

from ...test_sequence_feature_extraction_common import SequenceFeatureExtractionTestMixin


if is_speech_available():
			from transformers import SpeechaTextFeatureExtractor

_a 						=      random.Random()





def lowerCAmelCase__(__snake_case       ,__snake_case=1.0       ,__snake_case=None       ,__snake_case=None							)				->      List[Any]:







	'''simple docstring'''







	if rng is None:
		lowerCamelCase__								=		global_rng

	lowerCamelCase__								=		[]
	for batch_idx in range(shape[0]							):
		values.append([]							)
		for _ in range(shape[1]							):
			values[-1].append(rng.random() * scale							)

	return values






@require_torch
@require_torchaudio
class 					__A    (    unittest.TestCase ):

			'''simple docstring'''







			def __init__(    self       ,  __lowerCAmelCase       ,  __lowerCAmelCase=7       ,  __lowerCAmelCase=4_0_0       ,  __lowerCAmelCase=2_0_0_0       ,  __lowerCAmelCase=2_4       ,  __lowerCAmelCase=2_4       ,  __lowerCAmelCase=0.0       ,  __lowerCAmelCase=1_6_0_0_0       ,  __lowerCAmelCase=True       ,  __lowerCAmelCase=True       ,  ):



				'''simple docstring'''







				lowerCamelCase__								=		parent
				lowerCamelCase__								=		batch_size
				lowerCamelCase__								=		min_seq_length
				lowerCamelCase__								=		max_seq_length
				lowerCamelCase__								=		(self.max_seq_length - self.min_seq_length) // (self.batch_size - 1)
				lowerCamelCase__								=		feature_size
				lowerCamelCase__								=		num_mel_bins
				lowerCamelCase__								=		padding_value
				lowerCamelCase__								=		sampling_rate
				lowerCamelCase__								=		return_attention_mask
				lowerCamelCase__								=		do_normalize





			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				return {
				    "feature_size": self.feature_size,
				    "num_mel_bins": self.num_mel_bins,
				    "padding_value": self.padding_value,
				    "sampling_rate": self.sampling_rate,
				    "return_attention_mask": self.return_attention_mask,
				    "do_normalize": self.do_normalize,
				}





			def 		__lowerCamelCase				(    self       ,  __lowerCAmelCase=False       ,  __lowerCAmelCase=False							):



				'''simple docstring'''







				def _flatten(__lowerCAmelCase							):
					return list(itertools.chain(*__lowerCAmelCase							)							)

				if equal_length:
					lowerCamelCase__								=		[floats_list((self.max_seq_length, self.feature_size)							) for _ in range(self.batch_size							)]
				else:
					# make sure that inputs increase in size
					lowerCamelCase__								=		[
					    floats_list((x, self.feature_size)							)
					    for x in range(self.min_seq_length       ,  self.max_seq_length       ,  self.seq_length_diff							)
					]
				if numpify:
					lowerCamelCase__								=		[np.asarray(__lowerCAmelCase							) for x in speech_inputs]
				return speech_inputs






@require_torch
@require_torchaudio
class 					__A    (    lowerCAmelCase			,				unittest.TestCase ):

			'''simple docstring'''







			lowerCAmelCase_							     =						SpeechaTextFeatureExtractor if is_speech_available() else None





			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				lowerCamelCase__								=		SpeechaTextFeatureExtractionTester(self							)





			def 		__lowerCamelCase				(    self       ,  __lowerCAmelCase							):



				'''simple docstring'''







				self.assertTrue(np.all(np.mean(__lowerCAmelCase       ,  axis=0							) < 1E-3							)							)
				self.assertTrue(np.all(np.abs(np.var(__lowerCAmelCase       ,  axis=0							) - 1							) < 1E-3							)							)





			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				lowerCamelCase__								=		self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()							)
				# create three inputs of length 800, 1000, and 1200
				lowerCamelCase__								=		[floats_list((1, x)							)[0] for x in range(8_0_0       ,  1_4_0_0       ,  2_0_0							)]
				lowerCamelCase__								=		[np.asarray(__lowerCAmelCase							) for speech_input in speech_inputs]

				# Test feature size
				lowerCamelCase__								=		feature_extractor(__lowerCAmelCase       ,  padding=__lowerCAmelCase       ,  return_tensors='''np'''							).input_features
				self.assertTrue(input_features.ndim == 3							)
				self.assertTrue(input_features.shape[-1] == feature_extractor.feature_size							)

				# Test not batched input
				lowerCamelCase__								=		feature_extractor(speech_inputs[0]       ,  return_tensors='''np'''							).input_features
				lowerCamelCase__								=		feature_extractor(np_speech_inputs[0]       ,  return_tensors='''np'''							).input_features
				self.assertTrue(np.allclose(__lowerCAmelCase       ,  __lowerCAmelCase       ,  atol=1E-3							)							)

				# Test batched
				lowerCamelCase__								=		feature_extractor(__lowerCAmelCase       ,  return_tensors='''np'''							).input_features
				lowerCamelCase__								=		feature_extractor(__lowerCAmelCase       ,  return_tensors='''np'''							).input_features
				for enc_seq_a, enc_seq_a in zip(__lowerCAmelCase       ,  __lowerCAmelCase							):
					self.assertTrue(np.allclose(__lowerCAmelCase       ,  __lowerCAmelCase       ,  atol=1E-3							)							)

				# Test 2-D numpy arrays are batched.
				lowerCamelCase__								=		[floats_list((1, x)							)[0] for x in (8_0_0, 8_0_0, 8_0_0)]
				lowerCamelCase__								=		np.asarray(__lowerCAmelCase							)
				lowerCamelCase__								=		feature_extractor(__lowerCAmelCase       ,  return_tensors='''np'''							).input_features
				lowerCamelCase__								=		feature_extractor(__lowerCAmelCase       ,  return_tensors='''np'''							).input_features
				for enc_seq_a, enc_seq_a in zip(__lowerCAmelCase       ,  __lowerCAmelCase							):
					self.assertTrue(np.allclose(__lowerCAmelCase       ,  __lowerCAmelCase       ,  atol=1E-3							)							)





			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				lowerCamelCase__								=		self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()							)
				lowerCamelCase__								=		[floats_list((1, x)							)[0] for x in range(8_0_0       ,  1_4_0_0       ,  2_0_0							)]

				lowerCamelCase__								=		['''longest''', '''max_length''', '''do_not_pad''']
				lowerCamelCase__								=		[None, 1_6, None]
				for max_length, padding in zip(__lowerCAmelCase       ,  __lowerCAmelCase							):
					lowerCamelCase__								=		feature_extractor(
					    __lowerCAmelCase       ,  padding=__lowerCAmelCase       ,  max_length=__lowerCAmelCase       ,  return_attention_mask=__lowerCAmelCase							)
					lowerCamelCase__								=		inputs.input_features
					lowerCamelCase__								=		inputs.attention_mask
					lowerCamelCase__								=		[np.sum(__lowerCAmelCase							) for x in attention_mask]

					self._check_zero_mean_unit_variance(input_features[0][: fbank_feat_lengths[0]]							)
					self._check_zero_mean_unit_variance(input_features[1][: fbank_feat_lengths[1]]							)
					self._check_zero_mean_unit_variance(input_features[2][: fbank_feat_lengths[2]]							)





			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				lowerCamelCase__								=		self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()							)
				lowerCamelCase__								=		[floats_list((1, x)							)[0] for x in range(8_0_0       ,  1_4_0_0       ,  2_0_0							)]

				lowerCamelCase__								=		['''longest''', '''max_length''', '''do_not_pad''']
				lowerCamelCase__								=		[None, 1_6, None]
				for max_length, padding in zip(__lowerCAmelCase       ,  __lowerCAmelCase							):
					lowerCamelCase__								=		feature_extractor(
					    __lowerCAmelCase       ,  max_length=__lowerCAmelCase       ,  padding=__lowerCAmelCase       ,  return_tensors='''np'''       ,  return_attention_mask=__lowerCAmelCase							)
					lowerCamelCase__								=		inputs.input_features
					lowerCamelCase__								=		inputs.attention_mask
					lowerCamelCase__								=		[np.sum(__lowerCAmelCase							) for x in attention_mask]

					self._check_zero_mean_unit_variance(input_features[0][: fbank_feat_lengths[0]]							)
					self.assertTrue(input_features[0][fbank_feat_lengths[0] :].sum() < 1E-6							)
					self._check_zero_mean_unit_variance(input_features[1][: fbank_feat_lengths[1]]							)
					self.assertTrue(input_features[0][fbank_feat_lengths[1] :].sum() < 1E-6							)
					self._check_zero_mean_unit_variance(input_features[2][: fbank_feat_lengths[2]]							)





			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				lowerCamelCase__								=		self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()							)
				lowerCamelCase__								=		[floats_list((1, x)							)[0] for x in range(8_0_0       ,  1_4_0_0       ,  2_0_0							)]
				lowerCamelCase__								=		feature_extractor(
				    __lowerCAmelCase       ,  padding='''max_length'''       ,  max_length=4       ,  truncation=__lowerCAmelCase       ,  return_tensors='''np'''       ,  return_attention_mask=__lowerCAmelCase       ,  )
				lowerCamelCase__								=		inputs.input_features
				lowerCamelCase__								=		inputs.attention_mask
				lowerCamelCase__								=		np.sum(attention_mask == 1       ,  axis=1							)

				self._check_zero_mean_unit_variance(input_features[0, : fbank_feat_lengths[0]]							)
				self._check_zero_mean_unit_variance(input_features[1]							)
				self._check_zero_mean_unit_variance(input_features[2]							)





			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				lowerCamelCase__								=		self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()							)
				lowerCamelCase__								=		[floats_list((1, x)							)[0] for x in range(8_0_0       ,  1_4_0_0       ,  2_0_0							)]
				lowerCamelCase__								=		feature_extractor(
				    __lowerCAmelCase       ,  padding='''longest'''       ,  max_length=4       ,  truncation=__lowerCAmelCase       ,  return_tensors='''np'''       ,  return_attention_mask=__lowerCAmelCase       ,  )
				lowerCamelCase__								=		inputs.input_features
				lowerCamelCase__								=		inputs.attention_mask
				lowerCamelCase__								=		np.sum(attention_mask == 1       ,  axis=1							)

				self._check_zero_mean_unit_variance(input_features[0, : fbank_feat_lengths[0]]							)
				self._check_zero_mean_unit_variance(input_features[1, : fbank_feat_lengths[1]]							)
				self._check_zero_mean_unit_variance(input_features[2]							)

				# make sure that if max_length < longest -> then pad to max_length
				self.assertEqual(input_features.shape       ,  (3, 4, 2_4)							)

				lowerCamelCase__								=		[floats_list((1, x)							)[0] for x in range(8_0_0       ,  1_4_0_0       ,  2_0_0							)]
				lowerCamelCase__								=		feature_extractor(
				    __lowerCAmelCase       ,  padding='''longest'''       ,  max_length=1_6       ,  truncation=__lowerCAmelCase       ,  return_tensors='''np'''       ,  return_attention_mask=__lowerCAmelCase       ,  )
				lowerCamelCase__								=		inputs.input_features
				lowerCamelCase__								=		inputs.attention_mask
				lowerCamelCase__								=		np.sum(attention_mask == 1       ,  axis=1							)

				self._check_zero_mean_unit_variance(input_features[0, : fbank_feat_lengths[0]]							)
				self._check_zero_mean_unit_variance(input_features[1, : fbank_feat_lengths[1]]							)
				self._check_zero_mean_unit_variance(input_features[2]							)

				# make sure that if max_length < longest -> then pad to max_length
				self.assertEqual(input_features.shape       ,  (3, 6, 2_4)							)





			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				import torch

				lowerCamelCase__								=		self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()							)
				lowerCamelCase__								=		np.random.rand(1_0_0       ,  3_2							).astype(np.floataa							)
				lowerCamelCase__								=		np_speech_inputs.tolist()

				for inputs in [py_speech_inputs, np_speech_inputs]:
					lowerCamelCase__								=		feature_extractor.pad([{'''input_features''': inputs}]       ,  return_tensors='''np'''							)
					self.assertTrue(np_processed.input_features.dtype == np.floataa							)
					lowerCamelCase__								=		feature_extractor.pad([{'''input_features''': inputs}]       ,  return_tensors='''pt'''							)
					self.assertTrue(pt_processed.input_features.dtype == torch.floataa							)





			def 		__lowerCamelCase				(    self       ,  __lowerCAmelCase							):



				'''simple docstring'''







				from datasets import load_dataset

				lowerCamelCase__								=		load_dataset('''hf-internal-testing/librispeech_asr_dummy'''       ,  '''clean'''       ,  split='''validation'''							)
				# automatic decoding with librispeech
				lowerCamelCase__								=		ds.sort('''id'''							).select(range(__lowerCAmelCase							)							)[:num_samples]['''audio''']

				return [x["array"] for x in speech_samples]





			def 		__lowerCamelCase				(    self							):



				'''simple docstring'''







				lowerCamelCase__								=		np.array([
				    -1.5745, -1.7713, -1.7020, -1.6069, -1.2250, -1.1105, -0.9072, -0.8241,
				    -1.2310, -0.8098, -0.3320, -0.4101, -0.7985, -0.4996, -0.8213, -0.9128,
				    -1.0420, -1.1286, -1.0440, -0.7999, -0.8405, -1.2275, -1.5443, -1.4625,
				]							)
				# fmt: on

				lowerCamelCase__								=		self._load_datasamples(1							)
				lowerCamelCase__								=		self.feature_extraction_class(**self.feat_extract_tester.prepare_feat_extract_dict()							)
				lowerCamelCase__								=		feature_extractor(__lowerCAmelCase       ,  return_tensors='''pt'''							).input_features
				self.assertEquals(input_features.shape       ,  (1, 5_8_4, 2_4)							)
				self.assertTrue(np.allclose(input_features[0, 0, :3_0]       ,  __lowerCAmelCase       ,  atol=1E-4							)							)



