


'''simple docstring'''

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


lowerCamelCase							:   Any  						=	logging.get_logger(__name__)

lowerCamelCase							:   Tuple  						=	{
    'facebook/vit-mae-base': 'https://huggingface.co/facebook/vit-mae-base/resolve/main/config.json',
    # See all ViT MAE models at https://huggingface.co/models?filter=vit-mae
}
class   __lowerCAmelCase						(lowercase_     ):





      '''simple docstring'''






      lowerCAmelCase__					:     Optional[Any]  					=							"""vit_mae"""



      def __init__(self    :    Any   ,						UpperCamelCase    :    List[str]=768   ,						UpperCamelCase    :    Dict=12   ,						UpperCamelCase    :    Tuple=12   ,						UpperCamelCase    :    Any=3072   ,						UpperCamelCase    :    Dict="gelu"   ,						UpperCamelCase    :    Tuple=0.0   ,						UpperCamelCase    :    Union[str, Any]=0.0   ,						UpperCamelCase    :    List[str]=0.02   ,						UpperCamelCase    :    str=1E-12   ,						UpperCamelCase    :    Optional[Any]=224   ,						UpperCamelCase    :    Tuple=16   ,						UpperCamelCase    :    str=3   ,						UpperCamelCase    :    int=True   ,						UpperCamelCase    :    List[Any]=16   ,						UpperCamelCase    :    str=512   ,						UpperCamelCase    :    int=8   ,						UpperCamelCase    :    Optional[int]=2048   ,						UpperCamelCase    :    List[str]=0.75   ,						UpperCamelCase    :    Union[str, Any]=False   ,						**UpperCamelCase    :    int   ,						):

             '''simple docstring'''







             super().__init__(**UpperCamelCase )

             lowercase__      			= hidden_size
             lowercase__      			= num_hidden_layers
             lowercase__      			= num_attention_heads
             lowercase__      			= intermediate_size
             lowercase__      			= hidden_act
             lowercase__      			= hidden_dropout_prob
             lowercase__      			= attention_probs_dropout_prob
             lowercase__      			= initializer_range
             lowercase__      			= layer_norm_eps
             lowercase__      			= image_size
             lowercase__      			= patch_size
             lowercase__      			= num_channels
             lowercase__      			= qkv_bias
             lowercase__      			= decoder_num_attention_heads
             lowercase__      			= decoder_hidden_size
             lowercase__      			= decoder_num_hidden_layers
             lowercase__      			= decoder_intermediate_size
             lowercase__      			= mask_ratio
             lowercase__      			= norm_pix_loss







'''simple docstring'''






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


lowerCAmelCase__											=	logging.get_logger(__name__)

lowerCAmelCase__											=	{
    '''facebook/convnextv2-tiny-1k-224''': '''https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json''',
}






class 			lowercase_	(lowerCamelCase__				,       lowerCamelCase__      ):




  """simple docstring"""




  SCREAMING_SNAKE_CASE    :  List[str]							=			'convnextv2'






  def __init__(      self   :     Tuple					,lowercase__   :     Dict=3					,lowercase__   :     int=4					,lowercase__   :     Optional[int]=4					,lowercase__   :     Optional[Any]=None					,lowercase__   :     List[str]=None					,lowercase__   :     Tuple="gelu"					,lowercase__   :     Dict=0.0_2					,lowercase__   :     List[Any]=1e-1_2					,lowercase__   :     Optional[int]=0.0					,lowercase__   :     int=2_2_4					,lowercase__   :     int=None					,lowercase__   :     Tuple=None					,**lowercase__   :     List[str]					,):
   super().__init__(**lowercase__			)

   __lowercase							  = num_channels
   __lowercase							  = patch_size
   __lowercase							  = num_stages
   __lowercase							  = [9_6, 1_9_2, 3_8_4, 7_6_8] if hidden_sizes is None else hidden_sizes
   __lowercase							  = [3, 3, 9, 3] if depths is None else depths
   __lowercase							  = hidden_act
   __lowercase							  = initializer_range
   __lowercase							  = layer_norm_eps
   __lowercase							  = drop_path_rate
   __lowercase							  = image_size
   __lowercase							  = ['''stem'''] + [F"stage{idx}" for idx in range(1					,len(self.depths			) + 1			)]
   __lowercase  ,	__lowercase							  = get_aligned_output_features_output_indices(
       out_features=lowercase__					,out_indices=lowercase__					,stage_names=self.stage_names			)

