






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__							  =						{
    "google/bit-50": "https://huggingface.co/google/bit-50/resolve/main/config.json",
}






class 						lowercase_   (      lowercase					,    lowercase  ):






      '''simple docstring'''




      __snake_case	    =    '''bit'''
      __snake_case	    =    ['''preactivation''', '''bottleneck''']
      __snake_case	    =    ['''SAME''', '''VALID''']







      def __init__( self :		List[Any]					,   __UpperCAmelCase :		Optional[int]=3					,   __UpperCAmelCase :		Union[str, Any]=64					,   __UpperCAmelCase :		Optional[Any]=[256, 512, 1_024, 2_048]					,   __UpperCAmelCase :		Union[str, Any]=[3, 4, 6, 3]					,   __UpperCAmelCase :		List[Any]="preactivation"					,   __UpperCAmelCase :		int="relu"					,   __UpperCAmelCase :		int=None					,   __UpperCAmelCase :		str=32					,   __UpperCAmelCase :		str=0.0					,   __UpperCAmelCase :		List[Any]=False					,   __UpperCAmelCase :		int=32					,   __UpperCAmelCase :		Optional[Any]=1					,   __UpperCAmelCase :		Any=None					,   __UpperCAmelCase :		Tuple=None					,   **__UpperCAmelCase :		Tuple					,   )       ->List[str]:




       """simple docstring"""


       super().__init__(**__UpperCAmelCase    )
       if layer_type not in self.layer_types:
        raise ValueError(F"""layer_type={layer_type} is not one of {','.join(self.layer_types    )}"""    )
       if global_padding is not None:
        if global_padding.upper() in self.supported_padding:
         a						    = global_padding.upper()
        else:
         raise ValueError(F"""Padding strategy {global_padding} not supported"""    )
       a						    = num_channels
       a						    = embedding_size
       a						    = hidden_sizes
       a						    = depths
       a						    = layer_type
       a						    = hidden_act
       a						    = global_padding
       a						    = num_groups
       a						    = drop_path_rate
       a						    = embedding_dynamic_padding
       a						    = output_stride
       a						    = width_factor

       a						    = ['''stem'''] + [F"""stage{idx}""" for idx in range(1					,   len(__UpperCAmelCase    ) + 1    )]
       a    ,	a						    = get_aligned_output_features_output_indices(
           out_features=__UpperCAmelCase					,   out_indices=__UpperCAmelCase					,   stage_names=self.stage_names    )










from ... import PretrainedConfig


UpperCAmelCase__							  =						{
    "sijunhe/nezha-cn-base": "https://huggingface.co/sijunhe/nezha-cn-base/resolve/main/config.json",
}






class 						lowercase_   (      lowercase  ):






      '''simple docstring'''




      __snake_case	    =    NEZHA_PRETRAINED_CONFIG_ARCHIVE_MAP
      __snake_case	    =    '''nezha'''







      def __init__( self :		Union[str, Any]					,   __UpperCAmelCase :		List[str]=21_128					,   __UpperCAmelCase :		Any=768					,   __UpperCAmelCase :		int=12					,   __UpperCAmelCase :		Optional[int]=12					,   __UpperCAmelCase :		Tuple=3_072					,   __UpperCAmelCase :		Union[str, Any]="gelu"					,   __UpperCAmelCase :		List[str]=0.1					,   __UpperCAmelCase :		Any=0.1					,   __UpperCAmelCase :		str=512					,   __UpperCAmelCase :		List[Any]=64					,   __UpperCAmelCase :		Tuple=2					,   __UpperCAmelCase :		List[Any]=0.02					,   __UpperCAmelCase :		List[str]=1e-1_2					,   __UpperCAmelCase :		int=0.1					,   __UpperCAmelCase :		Dict=0					,   __UpperCAmelCase :		Any=2					,   __UpperCAmelCase :		Optional[Any]=3					,   __UpperCAmelCase :		int=True					,   **__UpperCAmelCase :		Optional[Any]					,   )       ->Any:




       """simple docstring"""


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

       a						    = vocab_size
       a						    = hidden_size
       a						    = num_hidden_layers
       a						    = num_attention_heads
       a						    = hidden_act
       a						    = intermediate_size
       a						    = hidden_dropout_prob
       a						    = attention_probs_dropout_prob
       a						    = max_position_embeddings
       a						    = max_relative_position
       a						    = type_vocab_size
       a						    = initializer_range
       a						    = layer_norm_eps
       a						    = classifier_dropout
       a						    = use_cache


