


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


_snake_case             =     logging.get_logger(__name__)

_snake_case             =     {
    '''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 	UpperCAmelCase_					(					UpperCamelCase		, UpperCamelCase    ):

   '''simple docstring'''




   __A :      Optional[int]     		=		"nat"

   __A :      int     		=		{
       "num_attention_heads": "num_heads",
       "num_hidden_layers": "num_layers",
   }






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






     """simple docstring"""





     super().__init__(**__A )

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







import warnings

from ...utils import logging
from .image_processing_dpt import DPTImageProcessor


_snake_case             =     logging.get_logger(__name__)
class 	UpperCAmelCase_					(					UpperCamelCase    ):

   '''simple docstring'''




   def __init__(		self						,				*__A						,				**__A ):






     """simple docstring"""





     warnings.warn(
         "The class DPTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"
         " use DPTImageProcessor instead."						,				__A						,				)
     super().__init__(*__A						,				**__A )



