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


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

lowerCamelCase_  :	List[str] 				=					{
    """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			(   _A       ,    _A					):






			'''simple docstring'''

			__UpperCamelCase :  Dict    =	"""nat"""

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

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

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








from typing import TYPE_CHECKING

from ...utils import _LazyModule


lowerCamelCase_  :	Dict 				=					{"""tokenization_byt5""": ["""ByT5Tokenizer"""]}


if TYPE_CHECKING:
							from .tokenization_byta import ByTaTokenizer
else:
							import sys

							lowerCamelCase_  :	Any 				=					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






