'''simple docstring'''





from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


SCREAMING_SNAKE_CASE_:     Union[str, Any]  =logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_:     List[str]  ={
    'microsoft/focalnet-tiny': 'https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json',
}




class        __A      ( UpperCamelCase__		,	UpperCamelCase__	):
    a__       :						int          =  """focalnet"""



    def __init__(self    :    Optional[int]   ,			__a    :    int=224   ,			__a    :    List[str]=4   ,			__a    :    int=3   ,			__a    :    List[Any]=96   ,			__a    :    str=False   ,			__a    :    List[Any]=[192, 384, 768, 768]   ,			__a    :    Any=[2, 2, 6, 2]   ,			__a    :    int=[2, 2, 2, 2]   ,			__a    :    List[str]=[3, 3, 3, 3]   ,			__a    :    Dict="gelu"   ,			__a    :    Tuple=4.0   ,			__a    :    Dict=0.0   ,			__a    :    List[str]=0.1   ,			__a    :    str=False   ,			__a    :    Any=1E-4   ,			__a    :    Tuple=False   ,			__a    :    Any=False   ,			__a    :    Optional[int]=False   ,			__a    :    Any=0.02   ,			__a    :    Dict=1E-5   ,			__a    :    str=32   ,			__a    :    Dict=None   ,			__a    :    str=None   ,			**__a    :    str   ,			):
         super().__init__(**__a )

         UpperCAmelCase_           =   image_size
         UpperCAmelCase_           =   patch_size
         UpperCAmelCase_           =   num_channels
         UpperCAmelCase_           =   embed_dim
         UpperCAmelCase_           =   use_conv_embed
         UpperCAmelCase_           =   hidden_sizes
         UpperCAmelCase_           =   depths
         UpperCAmelCase_           =   focal_levels
         UpperCAmelCase_           =   focal_windows
         UpperCAmelCase_           =   hidden_act
         UpperCAmelCase_           =   mlp_ratio
         UpperCAmelCase_           =   hidden_dropout_prob
         UpperCAmelCase_           =   drop_path_rate
         UpperCAmelCase_           =   use_layerscale
         UpperCAmelCase_           =   layerscale_value
         UpperCAmelCase_           =   use_post_layernorm
         UpperCAmelCase_           =   use_post_layernorm_in_modulation
         UpperCAmelCase_           =   normalize_modulator
         UpperCAmelCase_           =   initializer_range
         UpperCAmelCase_           =   layer_norm_eps
         UpperCAmelCase_           =   encoder_stride
         UpperCAmelCase_           =   ["stem"] + [f"""stage{idx}""" for idx in range(1   ,			len(self.depths ) + 1 )]
         UpperCAmelCase_    , UpperCAmelCase_           =   get_aligned_output_features_output_indices(
             out_features=__a   ,			out_indices=__a   ,			stage_names=self.stage_names )











"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCamelCase_								=		logging.get_logger(__name__)

lowerCamelCase_								=		{
    "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 					_SCREAMING_SNAKE_CASE(   A  ):
       SCREAMING_SNAKE_CASE_   :      List[str]							=  '''vivit'''




       def __init__(						self		,SCREAMING_SNAKE_CASE__=2_24		,SCREAMING_SNAKE_CASE__=32		,SCREAMING_SNAKE_CASE__=[2, 16, 16]		,SCREAMING_SNAKE_CASE__=3		,SCREAMING_SNAKE_CASE__=7_68		,SCREAMING_SNAKE_CASE__=12		,SCREAMING_SNAKE_CASE__=12		,SCREAMING_SNAKE_CASE__=30_72		,SCREAMING_SNAKE_CASE__="gelu_fast"		,SCREAMING_SNAKE_CASE__=0.0		,SCREAMING_SNAKE_CASE__=0.0		,SCREAMING_SNAKE_CASE__=0.0_2		,SCREAMING_SNAKE_CASE__=1E-06		,SCREAMING_SNAKE_CASE__=True		,**SCREAMING_SNAKE_CASE__		,)			->      Any:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :int						=  hidden_size
             __SCREAMING_SNAKE_CASE   :List[Any]						=  num_hidden_layers
             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  num_attention_heads
             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  intermediate_size
             __SCREAMING_SNAKE_CASE   :Any						=  hidden_act
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  hidden_dropout_prob
             __SCREAMING_SNAKE_CASE   :str						=  attention_probs_dropout_prob
             __SCREAMING_SNAKE_CASE   :Any						=  initializer_range
             __SCREAMING_SNAKE_CASE   :Optional[int]						=  layer_norm_eps

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

             super().__init__(**SCREAMING_SNAKE_CASE__							)