



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


_snake_case	=						logging.get_logger(__name__)

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



class 						UpperCAmelCase_					( a     ,      a):
       lowerCamelCase__         =	'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.02,    __a=1E-5,    __a=32,    __a=None,    __a=None,    **__a,    ):

              '''simple docstring'''

              super().__init__(**__a)

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





def        A       (      _lowerCamelCase						):





							'''simple docstring'''




							if length <= 0 or not isinstance(_lowerCamelCase       ,				_lowerCamelCase						):
														raise ValueError("Length must be a positive integer."						)
							return [n * (2 * n - 1) for n in range(_lowerCamelCase						)]


if __name__ == "__main__":
						print(hexagonal_numbers(length=5))
						print(hexagonal_numbers(length=10))
