




'''simple docstring'''




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


a_   :	Optional[int]							   = logging.get_logger(__name__)

a_   :	List[str]							   = {
    """ZinengTang/tvlt-base""": """https://huggingface.co/ZinengTang/tvlt-base/blob/main/config.json""",
}


class 						__UpperCamelCase (				lowerCamelCase__       ):
       lowercase			:					Optional[Any]   		='tvlt'






       def __init__(							self,	lowerCAmelCase=224,	lowerCAmelCase=2_048,	lowerCAmelCase=128,	lowerCAmelCase=[16, 16],	lowerCAmelCase=[16, 16],	lowerCAmelCase=3,	lowerCAmelCase=1,	lowerCAmelCase=8,	lowerCAmelCase=768,	lowerCAmelCase=12,	lowerCAmelCase=12,	lowerCAmelCase=3_072,	lowerCAmelCase="gelu",	lowerCAmelCase=0.0,	lowerCAmelCase=0.0,	lowerCAmelCase=0.0_2,	lowerCAmelCase=1e-6,	lowerCAmelCase=True,	lowerCAmelCase=False,	lowerCAmelCase=16,	lowerCAmelCase=512,	lowerCAmelCase=8,	lowerCAmelCase=2_048,	lowerCAmelCase=0.7_5,	lowerCAmelCase=0.1_5,	lowerCAmelCase="frame-level",	lowerCAmelCase=True,	lowerCAmelCase=True,	lowerCAmelCase="classification",	**lowerCAmelCase,	):



              """simple docstring"""







              super().__init__(**lowerCAmelCase						)

              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'''




from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


a_   :	Union[str, Any]							   = {
    """configuration_openai""": ["""OPENAI_GPT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """OpenAIGPTConfig"""],
    """tokenization_openai""": ["""OpenAIGPTTokenizer"""],
}

try:
     if not is_tokenizers_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     a_   :	Optional[int]							   = ["""OpenAIGPTTokenizerFast"""]

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     a_   :	int							   = [
         """OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST""",
         """OpenAIGPTDoubleHeadsModel""",
         """OpenAIGPTForSequenceClassification""",
         """OpenAIGPTLMHeadModel""",
         """OpenAIGPTModel""",
         """OpenAIGPTPreTrainedModel""",
         """load_tf_weights_in_openai_gpt""",
     ]

try:
     if not is_tf_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     a_   :	Dict							   = [
         """TF_OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST""",
         """TFOpenAIGPTDoubleHeadsModel""",
         """TFOpenAIGPTForSequenceClassification""",
         """TFOpenAIGPTLMHeadModel""",
         """TFOpenAIGPTMainLayer""",
         """TFOpenAIGPTModel""",
         """TFOpenAIGPTPreTrainedModel""",
     ]


if TYPE_CHECKING:
     from .configuration_openai import OPENAI_GPT_PRETRAINED_CONFIG_ARCHIVE_MAP, OpenAIGPTConfig
     from .tokenization_openai import OpenAIGPTTokenizer

     try:
          if not is_tokenizers_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_openai_fast import OpenAIGPTTokenizerFast

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_openai import (
              OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST,
              OpenAIGPTDoubleHeadsModel,
              OpenAIGPTForSequenceClassification,
              OpenAIGPTLMHeadModel,
              OpenAIGPTModel,
              OpenAIGPTPreTrainedModel,
              load_tf_weights_in_openai_gpt,
          )

     try:
          if not is_tf_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_tf_openai import (
              TF_OPENAI_GPT_PRETRAINED_MODEL_ARCHIVE_LIST,
              TFOpenAIGPTDoubleHeadsModel,
              TFOpenAIGPTForSequenceClassification,
              TFOpenAIGPTLMHeadModel,
              TFOpenAIGPTMainLayer,
              TFOpenAIGPTModel,
              TFOpenAIGPTPreTrainedModel,
          )

else:
     import sys

     a_   :	List[Any]							   = _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




