





"""simple docstring"""


import warnings

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding






class        lowercase__ (      __SCREAMING_SNAKE_CASE  ):

			"""simple docstring"""
			__lowerCAmelCase    :							Dict								=     ["""image_processor""", """tokenizer"""]
			__lowerCAmelCase    :							int								=     """VideoMAEImageProcessor"""
			__lowerCAmelCase    :							str								=     ("""CLIPTokenizer""", """CLIPTokenizerFast""")







			def __init__(			self	,      _A=None	,      _A=None	,      **_A						):






									'''simple docstring'''







									UpperCamelCase							:		int							      = None
									if "feature_extractor" in kwargs:
															warnings.warn(
															    """The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`"""
															    """ instead."""	,      _A	,      )
															UpperCamelCase							:		str							      = kwargs.pop("""feature_extractor"""						)

									UpperCamelCase							:		Dict							      = image_processor if image_processor is not None else feature_extractor
									if image_processor is None:
															raise ValueError("""You need to specify an `image_processor`."""						)
									if tokenizer is None:
															raise ValueError("""You need to specify a `tokenizer`."""						)

									super().__init__(_A	,      _A						)
									UpperCamelCase							:		str							      = self.image_processor







			def __call__(			self	,      _A=None	,      _A=None	,      _A=None	,      **_A						):






									'''simple docstring'''







									if text is None and videos is None:
															raise ValueError("""You have to specify either text or videos. Both cannot be none."""						)

									if text is not None:
															UpperCamelCase							:		Tuple							      = self.tokenizer(_A	,      return_tensors=_A	,      **_A						)

									if videos is not None:
															UpperCamelCase							:		Union[str, Any]							      = self.image_processor(_A	,      return_tensors=_A	,      **_A						)

									if text is not None and videos is not None:
															UpperCamelCase							:		List[str]							      = image_features.pixel_values
															return encoding
									elif text is not None:
															return encoding
									else:
															return BatchEncoding(data=dict(**_A						)	,      tensor_type=_A						)







			def      _a			(			self	,      *_A	,      **_A						):






									'''simple docstring'''







									return self.tokenizer.batch_decode(*_A	,      **_A						)







			def      _a			(			self	,      *_A	,      **_A						):






									'''simple docstring'''







									return self.tokenizer.decode(*_A	,      **_A						)







			@property
			def      _a			(			self						):






									'''simple docstring'''







									return ["input_ids", "attention_mask", "position_ids", "pixel_values"]







			@property
			def      _a			(			self						):






									'''simple docstring'''







									warnings.warn(
									    """`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead."""	,      _A	,      )
									return self.image_processor_class







			@property
			def      _a			(			self						):






									'''simple docstring'''







									warnings.warn(
									    """`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead."""	,      _A	,      )
									return self.image_processor










"""simple docstring"""


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


__magic_name__					:				Any	= logging.get_logger(__name__)

__magic_name__					:				Dict	= {
    """uw-madison/yoso-4096""": """https://huggingface.co/uw-madison/yoso-4096/resolve/main/config.json""",
    # See all YOSO models at https://huggingface.co/models?filter=yoso
}






class        lowercase__ (      __SCREAMING_SNAKE_CASE  ):

			"""simple docstring"""
			__lowerCAmelCase    :							Optional[int]								=     """yoso"""







			def __init__(			self	,      _A=5_0_2_6_5	,      _A=7_6_8	,      _A=1_2	,      _A=1_2	,      _A=3_0_7_2	,      _A="gelu"	,      _A=0.1	,      _A=0.1	,      _A=4_0_9_6	,      _A=1	,      _A=0.02	,      _A=1e-1_2	,      _A="absolute"	,      _A=True	,      _A=9	,      _A=6_4	,      _A=None	,      _A=True	,      _A=True	,      _A=1	,      _A=0	,      _A=2	,      **_A	,      ):






									'''simple docstring'''







									super().__init__(pad_token_id=_A	,      bos_token_id=_A	,      eos_token_id=_A	,      **_A						)

									UpperCamelCase							:		Any							      = vocab_size
									UpperCamelCase							:		Any							      = max_position_embeddings
									UpperCamelCase							:		int							      = hidden_size
									UpperCamelCase							:		List[Any]							      = num_hidden_layers
									UpperCamelCase							:		Any							      = num_attention_heads
									UpperCamelCase							:		Optional[Any]							      = intermediate_size
									UpperCamelCase							:		Optional[int]							      = hidden_act
									UpperCamelCase							:		List[Any]							      = hidden_dropout_prob
									UpperCamelCase							:		int							      = attention_probs_dropout_prob
									UpperCamelCase							:		Any							      = initializer_range
									UpperCamelCase							:		Optional[Any]							      = type_vocab_size
									UpperCamelCase							:		Any							      = layer_norm_eps
									UpperCamelCase							:		List[Any]							      = position_embedding_type
									UpperCamelCase							:		Optional[Any]							      = use_expectation
									UpperCamelCase							:		Any							      = hash_code_len
									UpperCamelCase							:		Optional[int]							      = num_hash
									UpperCamelCase							:		List[Any]							      = conv_window
									UpperCamelCase							:		Tuple							      = use_fast_hash
									UpperCamelCase							:		Dict							      = lsh_backward



