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


__SCREAMING_SNAKE_CASE						:   Dict         =			logging.get_logger(__name__)

__SCREAMING_SNAKE_CASE						:   List[Any]         =			{
    'microsoft/focalnet-tiny': 'https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json',
}



class        lowercase_   (					__snake_case						,			__snake_case		):
							_lowerCamelCase						=		'focalnet'



							def __init__(						self				,    lowercase_=224				,    lowercase_=4				,    lowercase_=3				,    lowercase_=96				,    lowercase_=False				,    lowercase_=[192, 384, 768, 768]				,    lowercase_=[2, 2, 6, 2]				,    lowercase_=[2, 2, 2, 2]				,    lowercase_=[3, 3, 3, 3]				,    lowercase_="gelu"				,    lowercase_=4.0				,    lowercase_=0.0				,    lowercase_=0.1				,    lowercase_=False				,    lowercase_=1e-4				,    lowercase_=False				,    lowercase_=False				,    lowercase_=False				,    lowercase_=0.02				,    lowercase_=1e-5				,    lowercase_=32				,    lowercase_=None				,    lowercase_=None				,    **lowercase_				,    ):
													super().__init__(**lowercase_    )

													_snake_case						:					Union[str, Any]    =   image_size
													_snake_case						:					Tuple    =   patch_size
													_snake_case						:					Any    =   num_channels
													_snake_case						:					int    =   embed_dim
													_snake_case						:					List[str]    =   use_conv_embed
													_snake_case						:					Optional[Any]    =   hidden_sizes
													_snake_case						:					List[Any]    =   depths
													_snake_case						:					Union[str, Any]    =   focal_levels
													_snake_case						:					Optional[Any]    =   focal_windows
													_snake_case						:					str    =   hidden_act
													_snake_case						:					Optional[Any]    =   mlp_ratio
													_snake_case						:					Any    =   hidden_dropout_prob
													_snake_case						:					List[Any]    =   drop_path_rate
													_snake_case						:					Optional[Any]    =   use_layerscale
													_snake_case						:					List[str]    =   layerscale_value
													_snake_case						:					Any    =   use_post_layernorm
													_snake_case						:					str    =   use_post_layernorm_in_modulation
													_snake_case						:					Optional[int]    =   normalize_modulator
													_snake_case						:					Dict    =   initializer_range
													_snake_case						:					List[Any]    =   layer_norm_eps
													_snake_case						:					Dict    =   encoder_stride
													_snake_case						:					Union[str, Any]    =   ["stem"] + [f"""stage{idx}""" for idx in range(1				,    len(self.depths    ) + 1    )]
													_snake_case						:					int    =   get_aligned_output_features_output_indices(
													    out_features=lowercase_				,    out_indices=lowercase_				,    stage_names=self.stage_names    )
import logging

from transformers import PretrainedConfig


__SCREAMING_SNAKE_CASE						:   Any         =			logging.getLogger(__name__)


__SCREAMING_SNAKE_CASE						:   int         =			{
    'bertabs-finetuned-cnndm': 'https://huggingface.co/remi/bertabs-finetuned-cnndm-extractive-abstractive-summarization/resolve/main/config.json',
}



class        lowercase_   (					__snake_case		):
							_lowerCamelCase						=		'bertabs'



							def __init__(						self				,    lowercase_=30_522				,    lowercase_=512				,    lowercase_=6				,    lowercase_=512				,    lowercase_=8				,    lowercase_=512				,    lowercase_=0.2				,    lowercase_=6				,    lowercase_=768				,    lowercase_=8				,    lowercase_=2_048				,    lowercase_=0.2				,    **lowercase_				,    ):
													super().__init__(**lowercase_    )

													_snake_case						:					List[Any]    =   vocab_size
													_snake_case						:					int    =   max_pos

													_snake_case						:					Tuple    =   enc_layers
													_snake_case						:					Optional[Any]    =   enc_hidden_size
													_snake_case						:					Union[str, Any]    =   enc_heads
													_snake_case						:					str    =   enc_ff_size
													_snake_case						:					Any    =   enc_dropout

													_snake_case						:					Tuple    =   dec_layers
													_snake_case						:					Optional[Any]    =   dec_hidden_size
													_snake_case						:					Dict    =   dec_heads
													_snake_case						:					str    =   dec_ff_size
													_snake_case						:					List[str]    =   dec_dropout