





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


UpperCAmelCase_     							= logging.get_logger(__name__)

UpperCAmelCase_     							= {
    """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     lowercase__       (	__lowerCamelCase			,				__lowerCamelCase				):

   '''simple docstring'''


   a						:							List[Any]   		=		"nat"

   a						:							List[Any]   		=		{
       "num_attention_heads": "num_heads",
       "num_hidden_layers": "num_layers",
   }




   def __init__(    self,		__magic_name__=4,		__magic_name__=3,		__magic_name__=64,		__magic_name__=[3, 4, 6, 5],		__magic_name__=[2, 4, 8, 16],		__magic_name__=7,		__magic_name__=3.0,		__magic_name__=True,		__magic_name__=0.0,		__magic_name__=0.0,		__magic_name__=0.1,		__magic_name__="gelu",		__magic_name__=0.02,		__magic_name__=1E-5,		__magic_name__=0.0,		__magic_name__=None,		__magic_name__=None,		**__magic_name__,		) ->      Optional[int]:






       """simple docstring"""
       super().__init__(**__magic_name__							)

       UpperCamelCase__							:				Tuple          =      patch_size
       UpperCamelCase__							:				Optional[Any]          =      num_channels
       UpperCamelCase__							:				Optional[Any]          =      embed_dim
       UpperCamelCase__							:				str          =      depths
       UpperCamelCase__							:				List[Any]          =      len(__magic_name__							)
       UpperCamelCase__							:				List[Any]          =      num_heads
       UpperCamelCase__							:				int          =      kernel_size
       UpperCamelCase__							:				int          =      mlp_ratio
       UpperCamelCase__							:				Dict          =      qkv_bias
       UpperCamelCase__							:				Union[str, Any]          =      hidden_dropout_prob
       UpperCamelCase__							:				List[str]          =      attention_probs_dropout_prob
       UpperCamelCase__							:				Tuple          =      drop_path_rate
       UpperCamelCase__							:				Any          =      hidden_act
       UpperCamelCase__							:				Optional[Any]          =      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__							:				Any          =      int(embed_dim * 2 ** (len(__magic_name__							) - 1)							)
       UpperCamelCase__							:				Optional[int]          =      layer_scale_init_value
       UpperCamelCase__							:				str          =      ['''stem'''] + [f"stage{idx}" for idx in range(1,		len(__magic_name__							) + 1							)]
       UpperCamelCase__   ,UpperCamelCase__							:				int          =      get_aligned_output_features_output_indices(
           out_features=__magic_name__,		out_indices=__magic_name__,		stage_names=self.stage_names							)





'''simple docstring'''

a_  :				str						= """
# Transformers installation
! pip install transformers datasets
# To install from source instead of the last release, comment the command above and uncomment the following one.
# ! pip install git+https://github.com/huggingface/transformers.git
"""

a_  :				Any						= [{"""type""": """code""", """content""": INSTALL_CONTENT}]
a_  :				int						= {
    """{processor_class}""": """FakeProcessorClass""",
    """{model_class}""": """FakeModelClass""",
    """{object_class}""": """FakeObjectClass""",
}



