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


lowerCamelCase__	=							logging.get_logger(__name__)

lowerCamelCase__	=							{
    """microsoft/focalnet-tiny""": """https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json""",
}







class        lowerCAmelCase__      (   __lowercase		,	__lowercase	):
						UpperCamelCase_							: List[str]	=		"focalnet"

						def __init__(			self       ,							a=2_24       ,							a=4       ,							a=3       ,							a=96       ,							a=False       ,							a=[1_92, 3_84, 7_68, 7_68]       ,							a=[2, 2, 6, 2]       ,							a=[2, 2, 2, 2]       ,							a=[3, 3, 3, 3]       ,							a="gelu"       ,							a=4.0       ,							a=0.0       ,							a=0.1       ,							a=False       ,							a=1e-4       ,							a=False       ,							a=False       ,							a=False       ,							a=0.02       ,							a=1e-5       ,							a=32       ,							a=None       ,							a=None       ,							**a       ,							)					->      Dict:


								'''simple docstring'''

								super().__init__(**a				)

								_UpperCamelCase						    =	image_size
								_UpperCamelCase						    =	patch_size
								_UpperCamelCase						    =	num_channels
								_UpperCamelCase						    =	embed_dim
								_UpperCamelCase						    =	use_conv_embed
								_UpperCamelCase						    =	hidden_sizes
								_UpperCamelCase						    =	depths
								_UpperCamelCase						    =	focal_levels
								_UpperCamelCase						    =	focal_windows
								_UpperCamelCase						    =	hidden_act
								_UpperCamelCase						    =	mlp_ratio
								_UpperCamelCase						    =	hidden_dropout_prob
								_UpperCamelCase						    =	drop_path_rate
								_UpperCamelCase						    =	use_layerscale
								_UpperCamelCase						    =	layerscale_value
								_UpperCamelCase						    =	use_post_layernorm
								_UpperCamelCase						    =	use_post_layernorm_in_modulation
								_UpperCamelCase						    =	normalize_modulator
								_UpperCamelCase						    =	initializer_range
								_UpperCamelCase						    =	layer_norm_eps
								_UpperCamelCase						    =	encoder_stride
								_UpperCamelCase						    =	["""stem"""] + [F'stage{idx}' for idx in range(1       ,							len(self.depths				) + 1				)]
								_UpperCamelCase    ,	_UpperCamelCase						    =	get_aligned_output_features_output_indices(
								    out_features=a       ,							out_indices=a       ,							stage_names=self.stage_names				)





from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCamelCase__	=							{
    "configuration_mctct": ["MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MCTCTConfig"],
    "feature_extraction_mctct": ["MCTCTFeatureExtractor"],
    "processing_mctct": ["MCTCTProcessor"],
}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCamelCase__	=							[
		    "MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST",
		    "MCTCTForCTC",
		    "MCTCTModel",
		    "MCTCTPreTrainedModel",
		]


if TYPE_CHECKING:
		from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
		from .feature_extraction_mctct import MCTCTFeatureExtractor
		from .processing_mctct import MCTCTProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
		import sys

		lowerCamelCase__	=							_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)



