

'''simple docstring'''



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


UpperCAmelCase :       Optional[Any]			   =     logging.get_logger(__name__)

UpperCAmelCase :       int			   =     {
    'uw-madison/mra-base-512-4': 'https://huggingface.co/uw-madison/mra-base-512-4/resolve/main/config.json',
}







class 						lowerCAmelCase__   (      a					):



 """simple docstring"""



 lowerCAmelCase__  					=      "mra"
 def __init__(		self					:       Union[str, Any]					,							__SCREAMING_SNAKE_CASE					:       Optional[int]=50_265					,							__SCREAMING_SNAKE_CASE					:       Tuple=768					,							__SCREAMING_SNAKE_CASE					:       Tuple=12					,							__SCREAMING_SNAKE_CASE					:       Dict=12					,							__SCREAMING_SNAKE_CASE					:       Optional[Any]=3_072					,							__SCREAMING_SNAKE_CASE					:       int="gelu"					,							__SCREAMING_SNAKE_CASE					:       Dict=0.1					,							__SCREAMING_SNAKE_CASE					:       Any=0.1					,							__SCREAMING_SNAKE_CASE					:       int=512					,							__SCREAMING_SNAKE_CASE					:       int=1					,							__SCREAMING_SNAKE_CASE					:       str=0.02					,							__SCREAMING_SNAKE_CASE					:       Tuple=1E-5					,							__SCREAMING_SNAKE_CASE					:       Dict="absolute"					,							__SCREAMING_SNAKE_CASE					:       Dict=4					,							__SCREAMING_SNAKE_CASE					:       Any="full"					,							__SCREAMING_SNAKE_CASE					:       Dict=0					,							__SCREAMING_SNAKE_CASE					:       Any=0					,							__SCREAMING_SNAKE_CASE					:       List[Any]=1					,							__SCREAMING_SNAKE_CASE					:       Any=0					,							__SCREAMING_SNAKE_CASE					:       Optional[Any]=2					,							**__SCREAMING_SNAKE_CASE					:       Tuple					,							)  -> Any:


      """simple docstring"""




      super().__init__(pad_token_id=__SCREAMING_SNAKE_CASE					,							bos_token_id=__SCREAMING_SNAKE_CASE					,							eos_token_id=__SCREAMING_SNAKE_CASE					,							**__SCREAMING_SNAKE_CASE			)

      __SCREAMING_SNAKE_CASE     =      vocab_size
      __SCREAMING_SNAKE_CASE     =      max_position_embeddings
      __SCREAMING_SNAKE_CASE     =      hidden_size
      __SCREAMING_SNAKE_CASE     =      num_hidden_layers
      __SCREAMING_SNAKE_CASE     =      num_attention_heads
      __SCREAMING_SNAKE_CASE     =      intermediate_size
      __SCREAMING_SNAKE_CASE     =      hidden_act
      __SCREAMING_SNAKE_CASE     =      hidden_dropout_prob
      __SCREAMING_SNAKE_CASE     =      attention_probs_dropout_prob
      __SCREAMING_SNAKE_CASE     =      initializer_range
      __SCREAMING_SNAKE_CASE     =      type_vocab_size
      __SCREAMING_SNAKE_CASE     =      layer_norm_eps
      __SCREAMING_SNAKE_CASE     =      position_embedding_type
      __SCREAMING_SNAKE_CASE     =      block_per_row
      __SCREAMING_SNAKE_CASE     =      approx_mode
      __SCREAMING_SNAKE_CASE     =      initial_prior_first_n_blocks
      __SCREAMING_SNAKE_CASE     =      initial_prior_diagonal_n_blocks









'''simple docstring'''



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


UpperCAmelCase :       Optional[int]			   =     logging.get_logger(__name__)

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







class 						lowerCAmelCase__   (      a ,					a					):



 """simple docstring"""



 lowerCAmelCase__  					=      "convnextv2"
 def __init__(		self					:       Any					,							__SCREAMING_SNAKE_CASE					:       int=3					,							__SCREAMING_SNAKE_CASE					:       Dict=4					,							__SCREAMING_SNAKE_CASE					:       List[Any]=4					,							__SCREAMING_SNAKE_CASE					:       Optional[int]=None					,							__SCREAMING_SNAKE_CASE					:       Dict=None					,							__SCREAMING_SNAKE_CASE					:       Optional[int]="gelu"					,							__SCREAMING_SNAKE_CASE					:       Union[str, Any]=0.02					,							__SCREAMING_SNAKE_CASE					:       Dict=1E-12					,							__SCREAMING_SNAKE_CASE					:       List[str]=0.0					,							__SCREAMING_SNAKE_CASE					:       Optional[Any]=224					,							__SCREAMING_SNAKE_CASE					:       Tuple=None					,							__SCREAMING_SNAKE_CASE					:       List[str]=None					,							**__SCREAMING_SNAKE_CASE					:       Union[str, Any]					,							)  -> Union[str, Any]:


      """simple docstring"""




      super().__init__(**__SCREAMING_SNAKE_CASE			)

      __SCREAMING_SNAKE_CASE     =      num_channels
      __SCREAMING_SNAKE_CASE     =      patch_size
      __SCREAMING_SNAKE_CASE     =      num_stages
      __SCREAMING_SNAKE_CASE     =      [96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
      __SCREAMING_SNAKE_CASE     =      [3, 3, 9, 3] if depths is None else depths
      __SCREAMING_SNAKE_CASE     =      hidden_act
      __SCREAMING_SNAKE_CASE     =      initializer_range
      __SCREAMING_SNAKE_CASE     =      layer_norm_eps
      __SCREAMING_SNAKE_CASE     =      drop_path_rate
      __SCREAMING_SNAKE_CASE     =      image_size
      __SCREAMING_SNAKE_CASE     =      ["""stem"""] + [f'stage{idx}' for idx in range(1					,							len(self.depths			) + 1			)]
      __SCREAMING_SNAKE_CASE   ,			__SCREAMING_SNAKE_CASE     =      get_aligned_output_features_output_indices(
          out_features=__SCREAMING_SNAKE_CASE					,							out_indices=__SCREAMING_SNAKE_CASE					,							stage_names=self.stage_names			)






