'''simple docstring'''




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


__SCREAMING_SNAKE_CASE			:	List[Any]	=    logging.get_logger(__name__)

__SCREAMING_SNAKE_CASE			:	Union[str, Any]	=    {
    """shi-labs/nat-mini-in1k-224""": """https://huggingface.co/shi-labs/nat-mini-in1k-224/resolve/main/config.json""",
    # See all Nat models at https://huggingface.co/models?filter=nat
}

class       lowerCamelCase_      (_a				,					_a       ):
      '''simple docstring'''

      __UpperCamelCase:    List[Any]         =		"nat"

      __UpperCamelCase:    List[str]         =		{
          "num_attention_heads": "num_heads",
          "num_hidden_layers": "num_layers",
      }




      def __init__(			self		:							int		,   A		:							Optional[int]=4		,   A		:							Union[str, Any]=3		,   A		:							Tuple=64		,   A		:							List[Any]=[3, 4, 6, 5]		,   A		:							Dict=[2, 4, 8, 16]		,   A		:							str=7		,   A		:							str=3.0		,   A		:							Dict=True		,   A		:							Tuple=0.0		,   A		:							Union[str, Any]=0.0		,   A		:							Optional[int]=0.1		,   A		:							Optional[int]="gelu"		,   A		:							Union[str, Any]=0.02		,   A		:							List[Any]=1E-5		,   A		:							Any=0.0		,   A		:							Tuple=None		,   A		:							str=None		,   **A		:							int		,   ):
             super().__init__(**lowerCamelCase__			)

             _UpperCAmelCase	:    Optional[int]				 =       patch_size
             _UpperCAmelCase	:    Tuple				 =       num_channels
             _UpperCAmelCase	:    Dict				 =       embed_dim
             _UpperCAmelCase	:    Tuple				 =       depths
             _UpperCAmelCase	:    str				 =       len(lowerCamelCase__			)
             _UpperCAmelCase	:    List[Any]				 =       num_heads
             _UpperCAmelCase	:    Tuple				 =       kernel_size
             _UpperCAmelCase	:    str				 =       mlp_ratio
             _UpperCAmelCase	:    Optional[Any]				 =       qkv_bias
             _UpperCAmelCase	:    Any				 =       hidden_dropout_prob
             _UpperCAmelCase	:    List[Any]				 =       attention_probs_dropout_prob
             _UpperCAmelCase	:    Optional[int]				 =       drop_path_rate
             _UpperCAmelCase	:    Dict				 =       hidden_act
             _UpperCAmelCase	:    List[str]				 =       layer_norm_eps
             _UpperCAmelCase	:    List[Any]				 =       initializer_range
             # we set the hidden_size attribute in order to make Nat work with VisionEncoderDecoderModel
             # this indicates the channel dimension after the last stage of the model
             _UpperCAmelCase	:    Dict				 =       int(embed_dim * 2 ** (len(lowerCamelCase__			) - 1)			)
             _UpperCAmelCase	:    List[str]				 =       layer_scale_init_value
             _UpperCAmelCase	:    List[Any]				 =       ["stem"] + [F"""stage{idx}""" for idx in range(1		,   len(lowerCamelCase__			) + 1			)]
             _UpperCAmelCase	:    Union[str, Any]				 =       get_aligned_output_features_output_indices(
                 out_features=lowerCamelCase__		,   out_indices=lowerCamelCase__		,   stage_names=self.stage_names			)




def 			_A	(      SCREAMING_SNAKE_CASE      ):
	UpperCAmelCase__:	Tuple									= int(SCREAMING_SNAKE_CASE      )
	if decimal in (0, 1):  # Exit cases for the recursion
		return str(SCREAMING_SNAKE_CASE      )
	UpperCAmelCase__							,						UpperCAmelCase__:	Union[str, Any]									= divmod(SCREAMING_SNAKE_CASE	,2      )
	return binary_recursive(SCREAMING_SNAKE_CASE      ) + str(SCREAMING_SNAKE_CASE      )



def 			_A	(      SCREAMING_SNAKE_CASE      ):
	UpperCAmelCase__:	List[str]									= str(SCREAMING_SNAKE_CASE      ).strip()
	if not number:
		raise ValueError("No input value was provided"      )
	UpperCAmelCase__:	Tuple									= "-" if number.startswith("-"      ) else ""
	UpperCAmelCase__:	Any									= number.lstrip("-"      )
	if not number.isnumeric():
		raise ValueError("Input value is not an integer"      )
	return f"{negative}0b{binary_recursive(int(SCREAMING_SNAKE_CASE      )      )}"


if __name__ == "__main__":
					from doctest import testmod

					testmod()