


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


__UpperCamelCase     :    Union[str, Any] 	=				logging.get_logger(__name__)

__UpperCamelCase     :    str 	=				{
    '''microsoft/focalnet-tiny''': '''https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json''',
}



class 				_UpperCamelCase			(    _a,_a    ):

   '''simple docstring'''







   a_					:				List[Any]     =			'''focalnet'''

   def __init__(	self	:			Optional[Any]							,	_lowerCamelCase	:			Union[str, Any]=2_2_4							,	_lowerCamelCase	:			List[str]=4							,	_lowerCamelCase	:			Optional[Any]=3							,	_lowerCamelCase	:			Dict=9_6							,	_lowerCamelCase	:			Tuple=False							,	_lowerCamelCase	:			Optional[Any]=[1_9_2, 3_8_4, 7_6_8, 7_6_8]							,	_lowerCamelCase	:			Optional[int]=[2, 2, 6, 2]							,	_lowerCamelCase	:			Union[str, Any]=[2, 2, 2, 2]							,	_lowerCamelCase	:			Optional[Any]=[3, 3, 3, 3]							,	_lowerCamelCase	:			List[str]="gelu"							,	_lowerCamelCase	:			List[str]=4.0							,	_lowerCamelCase	:			int=0.0							,	_lowerCamelCase	:			List[str]=0.1							,	_lowerCamelCase	:			List[Any]=False							,	_lowerCamelCase	:			Tuple=1E-4							,	_lowerCamelCase	:			Tuple=False							,	_lowerCamelCase	:			Optional[int]=False							,	_lowerCamelCase	:			Any=False							,	_lowerCamelCase	:			Any=0.02							,	_lowerCamelCase	:			Dict=1E-5							,	_lowerCamelCase	:			Optional[Any]=3_2							,	_lowerCamelCase	:			List[Any]=None							,	_lowerCamelCase	:			Tuple=None							,	**_lowerCamelCase	:			int							,	):






         '''simple docstring'''



         super().__init__(**__UpperCamelCase				)

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





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A		: Dict								=     {
    '''configuration_x_clip''': [
        '''XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''XCLIPConfig''',
        '''XCLIPTextConfig''',
        '''XCLIPVisionConfig''',
    ],
    '''processing_x_clip''': ['''XCLIPProcessor'''],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A		: Optional[Any]								=     [
		    '''XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''XCLIPModel''',
		    '''XCLIPPreTrainedModel''',
		    '''XCLIPTextModel''',
		    '''XCLIPVisionModel''',
		]

if TYPE_CHECKING:
		from .configuration_x_clip import (
		    XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    XCLIPConfig,
		    XCLIPTextConfig,
		    XCLIPVisionConfig,
		)
		from .processing_x_clip import XCLIPProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_x_clip import (
				    XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
				    XCLIPModel,
				    XCLIPPreTrainedModel,
				    XCLIPTextModel,
				    XCLIPVisionModel,
				)

else:
		import sys

		A		: List[str]								=     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)