
'''simple docstring'''




import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import CONFIG_MAPPING


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





class  A				(							__snake_case						):
     __magic_name__						=		'''upernet'''





     def __init__(							self						,			SCREAMING_SNAKE_CASE=None						,			SCREAMING_SNAKE_CASE=512						,			SCREAMING_SNAKE_CASE=0.02						,			SCREAMING_SNAKE_CASE=[1, 2, 3, 6]						,			SCREAMING_SNAKE_CASE=True						,			SCREAMING_SNAKE_CASE=0.4						,			SCREAMING_SNAKE_CASE=384						,			SCREAMING_SNAKE_CASE=256						,			SCREAMING_SNAKE_CASE=1						,			SCREAMING_SNAKE_CASE=False						,			SCREAMING_SNAKE_CASE=255						,			**SCREAMING_SNAKE_CASE						,			) ->				Dict:






         """simple docstring"""






         super().__init__(**SCREAMING_SNAKE_CASE__	)

         if backbone_config is None:
             logger.info('''`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.'''	)
             A       :   Any					=						CONFIG_MAPPING['''resnet'''](out_features=['''stage1''', '''stage2''', '''stage3''', '''stage4''']	)
         elif isinstance(SCREAMING_SNAKE_CASE__						,			SCREAMING_SNAKE_CASE__	):
             A       :   str					=						backbone_config.get('''model_type'''	)
             A       :   List[str]					=						CONFIG_MAPPING[backbone_model_type]
             A       :   Optional[Any]					=						config_class.from_dict(SCREAMING_SNAKE_CASE__	)

         A       :   Dict					=						backbone_config
         A       :   Union[str, Any]					=						hidden_size
         A       :   Any					=						initializer_range
         A       :   List[Any]					=						pool_scales
         A       :   Tuple					=						use_auxiliary_head
         A       :   List[str]					=						auxiliary_loss_weight
         A       :   Union[str, Any]					=						auxiliary_in_channels
         A       :   List[Any]					=						auxiliary_channels
         A       :   List[Any]					=						auxiliary_num_convs
         A       :   str					=						auxiliary_concat_input
         A       :   Union[str, Any]					=						loss_ignore_index





     def 				__lowerCAmelCase							(							self	) ->				List[Any]:






         """simple docstring"""






         A       :   List[Any]					=						copy.deepcopy(self.__dict__	)
         A       :   List[Any]					=						self.backbone_config.to_dict()
         A       :   List[Any]					=						self.__class__.model_type
         return output











"""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__							)