


from __future__ import annotations

from decimal import Decimal
from math import *  # noqa: F403

from sympy import diff
def      snake_case_						( __lowercase			,       __lowercase			,       __lowercase = 1_0**-1_0       ):
   UpperCAmelCase_							:      Optional[Any]						=   a
   while True:
      UpperCAmelCase_							:      Any						=   Decimal(__lowercase       ) - (
          Decimal(eval(__lowercase       )       ) / Decimal(eval(str(diff(__lowercase       )       )       )       )  # noqa: S307
      )
      # This number dictates the accuracy of the answer
      if abs(eval(__lowercase       )       ) < precision:  # noqa: S307
         return float(__lowercase       )


# Let's Execute
if __name__ == "__main__":
       # Find root of trigonometric function
       # Find value of pi
       print(F'The root of sin(x) = 0 is {newton_raphson("sin(x)", 2)}')
       # Find root of polynomial
       print(F'The root of x**2 - 5*x + 2 = 0 is {newton_raphson("x**2 - 5*x + 2", 0.4)}')
       # Find Square Root of 5
       print(F'The root of log(x) - 1 = 0 is {newton_raphson("log(x) - 1", 2)}')
       # Exponential Roots
       print(F'The root of exp(x) - 1 = 0 is {newton_raphson("exp(x) - 1", 0)}')



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