

'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


_UpperCAmelCase  :		Tuple  =		logging.get_logger(__name__)

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

class 						__magic_name__   (							A__ ,				A__ ):
 UpperCamelCase__     =       """focalnet"""







 def __init__(       self  , snake_case_=2_24  , snake_case_=4  , snake_case_=3  , snake_case_=96  , snake_case_=False  , snake_case_=[1_92, 3_84, 7_68, 7_68]  , snake_case_=[2, 2, 6, 2]  , snake_case_=[2, 2, 2, 2]  , snake_case_=[3, 3, 3, 3]  , snake_case_="gelu"  , snake_case_=4.0  , snake_case_=0.0  , snake_case_=0.1  , snake_case_=False  , snake_case_=1E-4  , snake_case_=False  , snake_case_=False  , snake_case_=False  , snake_case_=0.02  , snake_case_=1E-5  , snake_case_=32  , snake_case_=None  , snake_case_=None  , **snake_case_  , ):
   super().__init__(**_UpperCamelCase   )

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







import baseaa
def      A__       (    SCREAMING_SNAKE_CASE_   :      str						)  ->  bytes:






   """simple docstring"""







   return baseaa.baaencode(string.encode('''utf-8'''						)						)
def      A__       (    SCREAMING_SNAKE_CASE_   :      bytes						)  ->  str:






   """simple docstring"""







   return baseaa.baadecode(SCREAMING_SNAKE_CASE_						).decode('''utf-8'''						)


if __name__ == "__main__":
   UpperCAmelCase_           =	"Hello World!"
   UpperCAmelCase_           =	baseaa_encode(test)
   print(encoded)

   UpperCAmelCase_           =	baseaa_decode(encoded)
   print(decoded)