



"""simple docstring"""







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        __A       (	A_     ,A_    ):







		'''simple docstring'''





		lowerCAmelCase			:					Any   	=				"focalnet"







		def __init__(	self						:  Any			,_snake_case						:  Optional[int]=224			,_snake_case						:  Tuple=4			,_snake_case						:  Optional[Any]=3			,_snake_case						:  Optional[Any]=96			,_snake_case						:  List[Any]=False			,_snake_case						:  Optional[int]=[192, 384, 768, 768]			,_snake_case						:  Optional[Any]=[2, 2, 6, 2]			,_snake_case						:  Optional[int]=[2, 2, 2, 2]			,_snake_case						:  List[str]=[3, 3, 3, 3]			,_snake_case						:  List[str]="gelu"			,_snake_case						:  Dict=4.0			,_snake_case						:  str=0.0			,_snake_case						:  Any=0.1			,_snake_case						:  Dict=False			,_snake_case						:  List[Any]=1e-4			,_snake_case						:  Dict=False			,_snake_case						:  Optional[int]=False			,_snake_case						:  Optional[Any]=False			,_snake_case						:  Dict=0.02			,_snake_case						:  Optional[int]=1e-5			,_snake_case						:  Optional[int]=32			,_snake_case						:  Any=None			,_snake_case						:  List[Any]=None			,**_snake_case						:  List[Any]			,)					->		Tuple:






				"""simple docstring"""



				super().__init__(**_snake_case						)

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





"""simple docstring"""







import unittest

from accelerate import debug_launcher
from accelerate.test_utils import require_cpu, test_ops, test_script
@require_cpu
class        __A       (	unittest.TestCase    ):







		'''simple docstring'''





		def 					UpperCAmelCase    (	self						:  Optional[int]						)					->		str:






				"""simple docstring"""



				debug_launcher(test_script.main						)







		def 					UpperCAmelCase    (	self						:  Dict						)					->		Tuple:






				"""simple docstring"""



				debug_launcher(test_ops.main						)
