




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


_UpperCAmelCase	:						Optional[int]			=     logging.get_logger(__name__)

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




class    __lowerCAmelCase       (							lowerCAmelCase      , lowerCAmelCase):
       _a 					=						'''focalnet'''






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

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









def       UpperCAmelCase__  (     lowerCamelCase,			lowerCamelCase   ):
  return int((input_a, input_a).count(0   ) != 0   )



def       UpperCAmelCase__  (     ):
  assert nand_gate(0,			0   ) == 1
  assert nand_gate(0,			1   ) == 1
  assert nand_gate(1,			0   ) == 1
  assert nand_gate(1,			1   ) == 0


if __name__ == "__main__":
     print(nand_gate(0, 0))
     print(nand_gate(0, 1))
     print(nand_gate(1, 0))
     print(nand_gate(1, 1))



