




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


lowercase__				:      Tuple	   = logging.get_logger(__name__)

lowercase__				:      List[Any]	   = {
    "microsoft/focalnet-tiny": "https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json",
}




class       a__	( UpperCamelCase__       , UpperCamelCase__				):
     a		:      Tuple		 =     """focalnet"""







     def __init__(     self  ,		A=224  ,		A=4  ,		A=3  ,		A=96  ,		A=False  ,		A=[192, 384, 768, 768]  ,		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.0_2  ,		A=1e-5  ,		A=32  ,		A=None  ,		A=None  ,		**A  ,		)  ->   Dict:



          '''simple docstring'''



          super().__init__(**A			)

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







import math
import sys

def  SCREAMING_SNAKE_CASE							(       __UpperCamelCase)      ->					int:
     if number != int(__UpperCamelCase):
          raise ValueError("the value of input must be a natural number")
     if number < 0:
          raise ValueError("the value of input must not be a negative number")
     if number == 0:
          return 1
     a     =				[-1] * (number + 1)
     a     =				0
     for i in range(1		, number + 1):
          a     =				sys.maxsize
          a     =				int(math.sqrt(__UpperCamelCase))
          for j in range(1		, root + 1):
               a     =				1 + answers[i - (j**2)]
               a     =				min(__UpperCamelCase		, __UpperCamelCase)
          a     =				answer
     return answers[number]


if __name__ == "__main__":
   import doctest

   doctest.testmod()

