





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


UpperCAmelCase	:	str		     =       logging.get_logger(__name__)

UpperCAmelCase	:	str		     =       {
    # See all MEGATRON_BERT models at https://huggingface.co/models?filter=bert
}







class 				__lowerCAmelCase       (    UpperCamelCase__):
      _lowercase				:					List[Any]						=			"""megatron-bert"""







      def __init__(    self		,      lowerCAmelCase__=2_9_0_5_6		,      lowerCAmelCase__=1_0_2_4		,      lowerCAmelCase__=2_4		,      lowerCAmelCase__=1_6		,      lowerCAmelCase__=4_0_9_6		,      lowerCAmelCase__="gelu"		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=0.1		,      lowerCAmelCase__=5_1_2		,      lowerCAmelCase__=2		,      lowerCAmelCase__=0.02		,      lowerCAmelCase__=1E-12		,      lowerCAmelCase__=0		,      lowerCAmelCase__="absolute"		,      lowerCAmelCase__=True		,      **lowerCAmelCase__		,      )   ->						int:



        '''simple docstring'''




        super().__init__(pad_token_id=lowerCAmelCase__		,      **lowerCAmelCase__							)

        a__	:					Optional[int]										=vocab_size
        a__	:					Any										=hidden_size
        a__	:					List[Any]										=num_hidden_layers
        a__	:					Optional[int]										=num_attention_heads
        a__	:					List[str]										=hidden_act
        a__	:					Union[str, Any]										=intermediate_size
        a__	:					Optional[int]										=hidden_dropout_prob
        a__	:					Tuple										=attention_probs_dropout_prob
        a__	:					List[str]										=max_position_embeddings
        a__	:					Optional[int]										=type_vocab_size
        a__	:					int										=initializer_range
        a__	:					Any										=layer_norm_eps
        a__	:					List[Any]										=position_embedding_type
        a__	:					Dict										=use_cache













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


__lowerCamelCase       :     str   =     logging.get_logger(__name__)

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



class 					A__   (       __snake_case       ,   __snake_case			):
      _UpperCAmelCase	:Optional[int]						    =   'convnextv2'





      def __init__( self       ,							A_=3       ,							A_=4       ,							A_=4       ,							A_=None       ,							A_=None       ,							A_="gelu"       ,							A_=0.02       ,							A_=1e-12       ,							A_=0.0       ,							A_=224       ,							A_=None       ,							A_=None       ,							**A_       ,							):
       '''simple docstring'''




       super().__init__(**A_   )

       UpperCamelCase	:					Dict       	=   num_channels
       UpperCamelCase	:					Union[str, Any]       	=   patch_size
       UpperCamelCase	:					Union[str, Any]       	=   num_stages
       UpperCamelCase	:					List[Any]       	=   [96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
       UpperCamelCase	:					List[str]       	=   [3, 3, 9, 3] if depths is None else depths
       UpperCamelCase	:					Dict       	=   hidden_act
       UpperCamelCase	:					Union[str, Any]       	=   initializer_range
       UpperCamelCase	:					Tuple       	=   layer_norm_eps
       UpperCamelCase	:					str       	=   drop_path_rate
       UpperCamelCase	:					List[str]       	=   image_size
       UpperCamelCase	:					List[str]       	=   ["stem"] + [F"""stage{idx}""" for idx in range(1       ,							len(self.depths   ) + 1   )]
       UpperCamelCase	,    UpperCamelCase	:					str       	=   get_aligned_output_features_output_indices(
           out_features=A_       ,							out_indices=A_       ,							stage_names=self.stage_names   )
