





"""simple docstring"""







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


a__      :	Any       				=      logging.get_logger(__name__)

a__      :	List[str]       				=      {
    """facebook/timesformer""": """https://huggingface.co/facebook/timesformer/resolve/main/config.json""",
}




class __magic_name__   (       _UpperCamelCase		):
       UpperCamelCase    :						Optional[int]      =	"timesformer"
       def __init__(     self   ,  __magic_name__=2_2_4   ,  __magic_name__=1_6   ,  __magic_name__=3   ,  __magic_name__=8   ,  __magic_name__=7_6_8   ,  __magic_name__=1_2   ,  __magic_name__=1_2   ,  __magic_name__=3_0_7_2   ,  __magic_name__="gelu"   ,  __magic_name__=0.0   ,  __magic_name__=0.0   ,  __magic_name__=0.02   ,  __magic_name__=1e-6   ,  __magic_name__=True   ,  __magic_name__="divided_space_time"   ,  __magic_name__=0   ,  **__magic_name__   ,  ):





         """simple docstring"""


         super().__init__(**__lowerCAmelCase	)

         _lowerCAmelCase	      =					image_size
         _lowerCAmelCase	      =					patch_size
         _lowerCAmelCase	      =					num_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	      =					attention_type
         _lowerCAmelCase	      =					drop_path_rate











def   __lowercase       (			snake_case			):







				"""simple docstring"""






				return "".join([hex(snake_case			)[2:].zfill(2			).upper() for byte in list(snake_case			)]			)

def   __lowercase       (			snake_case			):







				"""simple docstring"""






				if (len(snake_case			) % 2) != 0:
								raise ValueError(
								    '''Base16 encoded data is invalid:
Data does not have an even number of hex digits.'''			)
				# Check the character set - the standard base16 alphabet
				# is uppercase according to RFC3548 section 6
				if not set(snake_case			) <= set('''0123456789ABCDEF'''			):
								raise ValueError(
								    '''Base16 encoded data is invalid:
Data is not uppercase hex or it contains invalid characters.'''			)
				# For every two hexadecimal digits (= a byte), turn it into an integer.
				# Then, string the result together into bytes, and return it.
				return bytes(int(data[i] + data[i + 1],	1_6			) for i in range(0,	len(snake_case			),	2			)			)


if __name__ == "__main__":
					import doctest

					doctest.testmod()






