



import abc
import copy
import dataclasses
from dataclasses import dataclass
from typing import ClassVar, Dict, Type, TypeVar

from ..features import Features


snake_case     :    Union[str, Any]						=    TypeVar('T', bound='TaskTemplate')




@dataclass(frozen=UpperCamelCase    )
class 				lowerCAmelCase__	(						abc.ABC    ):
					# `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
					__A  :     str
					__A  :     ClassVar[Features]
					__A  :     ClassVar[Features]







					def 			_lowercase      (							self   :  T      ,		_A   :  Features):
											return copy.deepcopy(self)







					@property
					def 			_lowercase      (							self   :  List[str]):
											return Features(**self.input_schema      ,		**self.label_schema)







					@property
					@abc.abstractmethod
					def 			_lowercase      (							self   :  Tuple):
											raise NotImplementedError







					@classmethod
					def 			_lowercase      (							cls   :  Type[T]      ,		_A   :  dict):
											A__						:				Dict         =			{f.name for f in dataclasses.fields(cls)}
											return cls(**{k: v for k, v in template_dict.items() if k in field_names})




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


snake_case     :    Any						=    logging.get_logger(__name__)

snake_case     :    List[str]						=    {
    'MCG-NJU/videomae-base': 'https://huggingface.co/MCG-NJU/videomae-base/resolve/main/config.json',
}




class 				lowerCAmelCase__	(						UpperCamelCase    ):
					__A  :     str     =    'videomae'







					def __init__(							self   :  Optional[Any]      ,		_A   :  str=224      ,		_A   :  Union[str, Any]=16      ,		_A   :  int=3      ,		_A   :  Tuple=16      ,		_A   :  int=2      ,		_A   :  List[Any]=768      ,		_A   :  List[Any]=12      ,		_A   :  Tuple=12      ,		_A   :  List[Any]=3072      ,		_A   :  Union[str, Any]="gelu"      ,		_A   :  Any=0.0      ,		_A   :  str=0.0      ,		_A   :  Tuple=0.02      ,		_A   :  Optional[Any]=1e-12      ,		_A   :  Tuple=True      ,		_A   :  Dict=True      ,		_A   :  str=6      ,		_A   :  Optional[int]=384      ,		_A   :  Any=4      ,		_A   :  Any=1536      ,		_A   :  Optional[int]=True      ,		**_A   :  Tuple      ,		):
											super().__init__(**_A)

											A__						:				List[str]         =			image_size
											A__						:				Union[str, Any]         =			patch_size
											A__						:				Optional[int]         =			num_channels
											A__						:				int         =			num_frames
											A__						:				List[Any]         =			tubelet_size

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

											A__						:				int         =			decoder_num_attention_heads
											A__						:				Tuple         =			decoder_hidden_size
											A__						:				int         =			decoder_num_hidden_layers
											A__						:				int         =			decoder_intermediate_size
											A__						:				Any         =			norm_pix_loss