


import string
from math import logaa
def      snake_case_						( __lowercase			,       __lowercase       ):
   UpperCAmelCase_							:      List[Any]						=   document.translate(
       str.maketrans(''''''			,       ''''''			,       string.punctuation       )       ).replace('''\n'''			,       ''''''       )
   UpperCAmelCase_							:      Optional[Any]						=   document_without_punctuation.split(''' '''       )  # word tokenization
   return len([word for word in tokenize_document if word.lower() == term.lower()]       )
def      snake_case_						( __lowercase			,       __lowercase       ):
   UpperCAmelCase_							:      Dict						=   corpus.lower().translate(
       str.maketrans(''''''			,       ''''''			,       string.punctuation       )       )  # strip all punctuation and replace it with ''
   UpperCAmelCase_							:      str						=   corpus_without_punctuation.split('''\n'''       )
   UpperCAmelCase_							:      Optional[Any]						=   term.lower()
   return (len([doc for doc in docs if term in doc]       ), len(__lowercase       ))
def      snake_case_						( __lowercase			,       __lowercase			,       __lowercase=False       ):
   if smoothing:
      if n == 0:
         raise ValueError('''log10(0) is undefined.'''       )
      return round(1 + logaa(n / (1 + df)       )			,       3       )

   if df == 0:
      raise ZeroDivisionError('''df must be > 0'''       )
   elif n == 0:
      raise ValueError('''log10(0) is undefined.'''       )
   return round(logaa(n / df       )			,       3       )


def      snake_case_						( __lowercase			,       __lowercase       ):
   return round(tf * idf			,       3       )



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


__UpperCamelCase				:  int      					=							logging.get_logger(__name__)

__UpperCamelCase				:  Union[str, Any]      					=							{
    'facebook/timesformer': 'https://huggingface.co/facebook/timesformer/resolve/main/config.json',
}





class  lowerCAmelCase__(    snake_case__						):






    '''simple docstring'''





    A_  :     str			= 'timesformer'





    def __init__(	self				:   int       ,   __snake_case				:   Any=224       ,   __snake_case				:   str=16       ,   __snake_case				:   Any=3       ,   __snake_case				:   List[Any]=8       ,   __snake_case				:   Dict=768       ,   __snake_case				:   Dict=12       ,   __snake_case				:   Tuple=12       ,   __snake_case				:   Dict=3_072       ,   __snake_case				:   str="gelu"       ,   __snake_case				:   Union[str, Any]=0.0       ,   __snake_case				:   List[Any]=0.0       ,   __snake_case				:   Tuple=0.02       ,   __snake_case				:   Optional[Any]=1E-6       ,   __snake_case				:   List[Any]=True       ,   __snake_case				:   List[str]="divided_space_time"       ,   __snake_case				:   Optional[int]=0       ,   **__snake_case				:   Dict       ,   ):





       '''simple docstring'''
       super().__init__(**__snake_case	)

       UpperCAmelCase_							:      Optional[int]						=   image_size
       UpperCAmelCase_							:      Optional[Any]						=   patch_size
       UpperCAmelCase_							:      Any						=   num_channels
       UpperCAmelCase_							:      int						=   num_frames

       UpperCAmelCase_							:      List[Any]						=   hidden_size
       UpperCAmelCase_							:      Any						=   num_hidden_layers
       UpperCAmelCase_							:      Dict						=   num_attention_heads
       UpperCAmelCase_							:      List[Any]						=   intermediate_size
       UpperCAmelCase_							:      str						=   hidden_act
       UpperCAmelCase_							:      List[str]						=   hidden_dropout_prob
       UpperCAmelCase_							:      List[str]						=   attention_probs_dropout_prob
       UpperCAmelCase_							:      Optional[int]						=   initializer_range
       UpperCAmelCase_							:      List[str]						=   layer_norm_eps
       UpperCAmelCase_							:      str						=   qkv_bias

       UpperCAmelCase_							:      Dict						=   attention_type
       UpperCAmelCase_							:      str						=   drop_path_rate