





'''simple docstring'''






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


A__    :       Optional[Any]              =logging.get_logger(__name__)

A__    :       Optional[int]              ={
    """microsoft/focalnet-tiny""": """https://huggingface.co/microsoft/focalnet-tiny/resolve/main/config.json""",
}




class 			UpperCAmelCase					(      __UpperCamelCase							,		__UpperCamelCase       ):
 _lowercase:      Optional[Any]											=       '''focalnet'''




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

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













'''simple docstring'''






def        UpperCamelCase__				(		lowerCAmelCase							,     lowerCAmelCase  ):





      """simple docstring"""


      if len(lowerCAmelCase  ) != len(lowerCAmelCase  ):
            raise ValueError("""String lengths must match!"""  )

      _lowerCAmelCase												=							0

      for chara, chara in zip(lowerCAmelCase							,     lowerCAmelCase  ):
            if chara != chara:
                  count += 1

      return count


if __name__ == "__main__":
      import doctest

      doctest.testmod()






