


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


UpperCAmelCase      =   logging.get_logger(__name__)

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







class lowerCAmelCase_						(			lowerCamelCase__	):

 '''simple docstring'''

 __snake_case												=  "mra"



 def __init__(     self		,				_UpperCAmelCase=5_02_65		,				_UpperCAmelCase=7_68		,				_UpperCAmelCase=12		,				_UpperCAmelCase=12		,				_UpperCAmelCase=30_72		,				_UpperCAmelCase="gelu"		,				_UpperCAmelCase=0.1		,				_UpperCAmelCase=0.1		,				_UpperCAmelCase=5_12		,				_UpperCAmelCase=1		,				_UpperCAmelCase=0.02		,				_UpperCAmelCase=1E-5		,				_UpperCAmelCase="absolute"		,				_UpperCAmelCase=4		,				_UpperCAmelCase="full"		,				_UpperCAmelCase=0		,				_UpperCAmelCase=0		,				_UpperCAmelCase=1		,				_UpperCAmelCase=0		,				_UpperCAmelCase=2		,				**_UpperCAmelCase		,				):
       super().__init__(pad_token_id=_UpperCAmelCase		,				bos_token_id=_UpperCAmelCase		,				eos_token_id=_UpperCAmelCase		,				**_UpperCAmelCase )

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



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


UpperCAmelCase      =   logging.get_logger(__name__)

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







class lowerCAmelCase_						(			lowerCamelCase__ ,						lowerCamelCase__	):

 '''simple docstring'''

 __snake_case												=  "convnextv2"



 def __init__(     self		,				_UpperCAmelCase=3		,				_UpperCAmelCase=4		,				_UpperCAmelCase=4		,				_UpperCAmelCase=None		,				_UpperCAmelCase=None		,				_UpperCAmelCase="gelu"		,				_UpperCAmelCase=0.02		,				_UpperCAmelCase=1E-12		,				_UpperCAmelCase=0.0		,				_UpperCAmelCase=2_24		,				_UpperCAmelCase=None		,				_UpperCAmelCase=None		,				**_UpperCAmelCase		,				):
       super().__init__(**_UpperCAmelCase )

       snake_case_	=				num_channels
       snake_case_	=				patch_size
       snake_case_	=				num_stages
       snake_case_	=				[96, 1_92, 3_84, 7_68] if hidden_sizes is None else hidden_sizes
       snake_case_	=				[3, 3, 9, 3] if depths is None else depths
       snake_case_	=				hidden_act
       snake_case_	=				initializer_range
       snake_case_	=				layer_norm_eps
       snake_case_	=				drop_path_rate
       snake_case_	=				image_size
       snake_case_	=				['''stem'''] + [F'''stage{idx}''' for idx in range(1		,				len(self.depths ) + 1 )]
       snake_case_	,   snake_case_	=				get_aligned_output_features_output_indices(
           out_features=_UpperCAmelCase		,				out_indices=_UpperCAmelCase		,				stage_names=self.stage_names )