






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


A        =			logging.get_logger(__name__)

A        =			{
    "google/vivit-b-16x2-kinetics400": (
        "https://huggingface.co/google/vivit-b-16x2-kinetics400/resolve/main/config.json"
    ),
    # See all Vivit models at https://huggingface.co/models?filter=vivit
}


class 							__a							(  _A						):





  '''simple docstring'''



  UpperCAmelCase__      :				Any				    =						"""vivit"""


  def __init__(						self ,    UpperCamelCase__=224 ,    UpperCamelCase__=32 ,    UpperCamelCase__=[2, 16, 16] ,    UpperCamelCase__=3 ,    UpperCamelCase__=768 ,    UpperCamelCase__=12 ,    UpperCamelCase__=12 ,    UpperCamelCase__=3072 ,    UpperCamelCase__="gelu_fast" ,    UpperCamelCase__=0.0 ,    UpperCamelCase__=0.0 ,    UpperCamelCase__=0.02 ,    UpperCamelCase__=1E-06 ,    UpperCamelCase__=True ,    **UpperCamelCase__ ,    ):
      SCREAMING_SNAKE_CASE_   :	str													=   hidden_size
      SCREAMING_SNAKE_CASE_   :	Dict													=   num_hidden_layers
      SCREAMING_SNAKE_CASE_   :	str													=   num_attention_heads
      SCREAMING_SNAKE_CASE_   :	str													=   intermediate_size
      SCREAMING_SNAKE_CASE_   :	List[str]													=   hidden_act
      SCREAMING_SNAKE_CASE_   :	Dict													=   hidden_dropout_prob
      SCREAMING_SNAKE_CASE_   :	Any													=   attention_probs_dropout_prob
      SCREAMING_SNAKE_CASE_   :	List[Any]													=   initializer_range
      SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   layer_norm_eps

      SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   image_size
      SCREAMING_SNAKE_CASE_   :	List[str]													=   num_frames
      SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   tubelet_size
      SCREAMING_SNAKE_CASE_   :	List[str]													=   num_channels
      SCREAMING_SNAKE_CASE_   :	List[str]													=   qkv_bias

      super().__init__(**UpperCamelCase__       )







from timeit import timeit



def 					_lowerCamelCase(			lowerCAmelCase__				:		int      ):





				'''simple docstring'''







				if number < 0:
								raise ValueError('the value of input must not be negative'      )
				SCREAMING_SNAKE_CASE_   :	Tuple													=   0
				while number:
								number &= number - 1
								result += 1
				return result



def 					_lowerCamelCase(			lowerCAmelCase__				:		int      ):





				'''simple docstring'''







				if number < 0:
								raise ValueError('the value of input must not be negative'      )
				SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   0
				while number:
								if number % 2 == 1:
												result += 1
								number >>= 1
				return result



def 					_lowerCamelCase(			):





				'''simple docstring'''







				def do_benchmark(lowerCAmelCase__				:		int      ) -> None:
								SCREAMING_SNAKE_CASE_   :	int													=   'import __main__ as z'
								print(F'''Benchmark when {number = }:'''      )
								print(F'''{get_set_bits_count_using_modulo_operator(lowerCAmelCase__      ) = }'''      )
								SCREAMING_SNAKE_CASE_   :	int													=   timeit('z.get_set_bits_count_using_modulo_operator(25)'    ,    setup=lowerCAmelCase__      )
								print(F'''timeit() runs in {timing} seconds'''      )
								print(F'''{get_set_bits_count_using_brian_kernighans_algorithm(lowerCAmelCase__      ) = }'''      )
								SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   timeit(
								    'z.get_set_bits_count_using_brian_kernighans_algorithm(25)'    ,    setup=lowerCAmelCase__    ,    )
								print(F'''timeit() runs in {timing} seconds'''      )

				for number in (25, 37, 58, 0):
								do_benchmark(lowerCAmelCase__      )
								print()


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				benchmark()