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          =						{
    """microsoft/focalnet-tiny""": """https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json""",
}





class UpperCAmelCase		(   __A   ,			__A    ):


				'''simple docstring'''






				lowerCamelCase_        =   '''focalnet'''
				def __init__(		self						,      lowercase=2_2_4						,      lowercase=4						,      lowercase=3						,      lowercase=9_6						,      lowercase=False						,      lowercase=[1_9_2, 3_8_4, 7_6_8, 7_6_8]						,      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=3_2						,      lowercase=None						,      lowercase=None						,      **lowercase						,      ):



						"""simple docstring"""





						super().__init__(**lowercase   )

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







# flake8: noqa
# Lint as: python3
_UpperCAmelCase          =						[
    """VerificationMode""",
    """Version""",
    """disable_progress_bar""",
    """enable_progress_bar""",
    """is_progress_bar_enabled""",
    """experimental""",
]

from .info_utils import VerificationMode
from .logging import disable_progress_bar, enable_progress_bar, is_progress_bar_enabled
from .version import Version
from .experimental import experimental






