
"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


SCREAMING_SNAKE_CASE_			      =					logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_			      =					{
    '''ZinengTang/tvlt-base''': '''https://huggingface.co/ZinengTang/tvlt-base/blob/main/config.json''',
}
class      lowerCAmelCase_						(							A__				):



							'''simple docstring'''





							_snake_case		     =						'''tvlt'''




							def __init__(				self  ,							snake_case_=224  ,							snake_case_=2_048  ,							snake_case_=128  ,							snake_case_=[16, 16]  ,							snake_case_=[16, 16]  ,							snake_case_=3  ,							snake_case_=1  ,							snake_case_=8  ,							snake_case_=768  ,							snake_case_=12  ,							snake_case_=12  ,							snake_case_=3_072  ,							snake_case_="gelu"  ,							snake_case_=0.0  ,							snake_case_=0.0  ,							snake_case_=0.02  ,							snake_case_=1e-6  ,							snake_case_=True  ,							snake_case_=False  ,							snake_case_=16  ,							snake_case_=512  ,							snake_case_=8  ,							snake_case_=2_048  ,							snake_case_=0.75  ,							snake_case_=0.15  ,							snake_case_="frame-level"  ,							snake_case_=True  ,							snake_case_=True  ,							snake_case_="classification"  ,							**snake_case_  ,							)   ->       str:
													super().__init__(**snake_case_							)

													if audio_mask_type not in ("frame-level", "patch_level"):
																			raise ValueError(
																			    """audio_mask_type must be one of two acceptable strategies - {'frame_level', 'patch-level') """
																			    f"""got {audio_mask_type}"""							)

													__lowerCAmelCase        =       image_size
													__lowerCAmelCase        =       spectrogram_length
													__lowerCAmelCase        =       frequency_length
													__lowerCAmelCase        =       image_patch_size
													__lowerCAmelCase        =       audio_patch_size
													__lowerCAmelCase        =       num_image_channels
													__lowerCAmelCase        =       num_audio_channels
													__lowerCAmelCase        =       num_frames

													__lowerCAmelCase        =       hidden_size
													__lowerCAmelCase        =       num_hidden_layers
													__lowerCAmelCase        =       num_attention_heads
													__lowerCAmelCase        =       intermediate_size
													__lowerCAmelCase        =       hidden_act
													__lowerCAmelCase        =       hidden_dropout_prob
													__lowerCAmelCase        =       attention_probs_dropout_prob
													__lowerCAmelCase        =       initializer_range
													__lowerCAmelCase        =       layer_norm_eps
													__lowerCAmelCase        =       qkv_bias
													__lowerCAmelCase        =       use_mean_pooling

													__lowerCAmelCase        =       decoder_num_attention_heads
													__lowerCAmelCase        =       decoder_hidden_size
													__lowerCAmelCase        =       decoder_num_hidden_layers
													__lowerCAmelCase        =       decoder_intermediate_size
													__lowerCAmelCase        =       pixel_mask_ratio
													__lowerCAmelCase        =       audio_mask_ratio
													__lowerCAmelCase        =       audio_mask_type

													__lowerCAmelCase        =       task_matching
													__lowerCAmelCase        =       task_mae
													__lowerCAmelCase        =       loss_type


"""simple docstring"""
import unittest

from transformers import is_torch_available, load_tool

from .test_tools_common import ToolTesterMixin


if is_torch_available():
			import torch
class      lowerCAmelCase_						(							unittest.TestCase							,							A__				):



							'''simple docstring'''





							def  A__		(				self							)   ->       Any:
													__lowerCAmelCase        =       load_tool("""speech-to-text"""							)
													self.tool.setup()




							def  A__		(				self							)   ->       int:
													__lowerCAmelCase        =       self.tool(torch.ones(3_000							)							)
													self.assertEqual(snake_case_  ,							""" you"""							)




							def  A__		(				self							)   ->       Optional[int]:
													__lowerCAmelCase        =       self.tool(audio=torch.ones(3_000							)							)
													self.assertEqual(snake_case_  ,							""" you"""							)
