



'''simple docstring'''



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


lowerCAmelCase_  :							Dict             =    logging.get_logger(__name__)

lowerCAmelCase_  :							str             =    {
    'microsoft/focalnet-tiny': 'https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json',
}
class 						lowerCamelCase_				(       snake_case_     ,					snake_case_      ):
						_lowerCAmelCase  : int						  =					'focalnet'







						def __init__(	self :   Dict					,     lowerCAmelCase__ :   Union[str, Any]=2_24					,     lowerCAmelCase__ :   List[Any]=4					,     lowerCAmelCase__ :   Optional[Any]=3					,     lowerCAmelCase__ :   Optional[int]=96					,     lowerCAmelCase__ :   List[Any]=False					,     lowerCAmelCase__ :   str=[1_92, 3_84, 7_68, 7_68]					,     lowerCAmelCase__ :   Tuple=[2, 2, 6, 2]					,     lowerCAmelCase__ :   List[Any]=[2, 2, 2, 2]					,     lowerCAmelCase__ :   Any=[3, 3, 3, 3]					,     lowerCAmelCase__ :   Tuple="gelu"					,     lowerCAmelCase__ :   Optional[Any]=4.0					,     lowerCAmelCase__ :   List[str]=0.0					,     lowerCAmelCase__ :   List[Any]=0.1					,     lowerCAmelCase__ :   Optional[int]=False					,     lowerCAmelCase__ :   int=1e-4					,     lowerCAmelCase__ :   Any=False					,     lowerCAmelCase__ :   Union[str, Any]=False					,     lowerCAmelCase__ :   List[str]=False					,     lowerCAmelCase__ :   Any=0.02					,     lowerCAmelCase__ :   int=1e-5					,     lowerCAmelCase__ :   Any=32					,     lowerCAmelCase__ :   Tuple=None					,     lowerCAmelCase__ :   Optional[Any]=None					,     **lowerCAmelCase__ :   Tuple					,     ):

													"""simple docstring"""
													super().__init__(**lowerCAmelCase__					)

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









'''simple docstring'''



def        UpperCAmelCase (    A	:					int					):
							if not isinstance(A       ,		A					):
														SCREAMING_SNAKE_CASE       :   List[str]         =      F"""Input value of [number={number}] must be an integer"""
														raise TypeError(A					)
							if number < 0:
														return False
							SCREAMING_SNAKE_CASE       :   List[str]         =      number * number
							while number > 0:
														if number % 10 != number_square % 10:
																					return False
														number //= 10
														number_square //= 10
							return True


if __name__ == "__main__":
							import doctest

							doctest.testmod()




