


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


lowercase_	   =     logging.get_logger(__name__)

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


class 	A_ (	__UpperCamelCase ,				__UpperCamelCase   ):




      '''simple docstring'''


      __snake_case 	=       """focalnet"""




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

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





from maths.is_square_free import is_square_free
from maths.prime_factors import prime_factors
def 				UpperCamelCase__					(  SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase		:							Dict		 =						prime_factors(SCREAMING_SNAKE_CASE__						)
 if is_square_free(SCREAMING_SNAKE_CASE__						):
  return -1 if len(SCREAMING_SNAKE_CASE__						) % 2 else 1
 return 0


if __name__ == "__main__":
       import doctest

       doctest.testmod()

