

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


__lowercase				      =						logging.get_logger(__name__)

__lowercase				      =						{
    """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			):
   _lowercase     :       Tuple  					=    'nat'

   _lowercase     :       Tuple  					=    {
       'num_attention_heads': 'num_heads',
       'num_hidden_layers': 'num_layers',
   }

   def __init__(				self	:    Optional[int]			,						lowerCamelCase__	:    List[str]=4			,						lowerCamelCase__	:    Optional[Any]=3			,						lowerCamelCase__	:    str=6_4			,						lowerCamelCase__	:    Optional[Any]=[3, 4, 6, 5]			,						lowerCamelCase__	:    Optional[int]=[2, 4, 8, 1_6]			,						lowerCamelCase__	:    List[Any]=7			,						lowerCamelCase__	:    Optional[Any]=3.0			,						lowerCamelCase__	:    List[Any]=True			,						lowerCamelCase__	:    int=0.0			,						lowerCamelCase__	:    Optional[Any]=0.0			,						lowerCamelCase__	:    Tuple=0.1			,						lowerCamelCase__	:    List[Any]="gelu"			,						lowerCamelCase__	:    List[Any]=0.02			,						lowerCamelCase__	:    Optional[int]=1e-5			,						lowerCamelCase__	:    Tuple=0.0			,						lowerCamelCase__	:    Any=None			,						lowerCamelCase__	:    Any=None			,						**lowerCamelCase__	:    str			,						) ->			int:
         """simple docstring"""





         super().__init__(**lowerCamelCase__       )

         A_							       =		patch_size
         A_							       =		num_channels
         A_							       =		embed_dim
         A_							       =		depths
         A_							       =		len(lowerCamelCase__       )
         A_							       =		num_heads
         A_							       =		kernel_size
         A_							       =		mlp_ratio
         A_							       =		qkv_bias
         A_							       =		hidden_dropout_prob
         A_							       =		attention_probs_dropout_prob
         A_							       =		drop_path_rate
         A_							       =		hidden_act
         A_							       =		layer_norm_eps
         A_							       =		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
         A_							       =		int(embed_dim * 2 ** (len(lowerCamelCase__       ) - 1)       )
         A_							       =		layer_scale_init_value
         A_							       =		['''stem'''] + [F"stage{idx}" for idx in range(1			,						len(lowerCamelCase__       ) + 1       )]
         A_       ,A_							       =		get_aligned_output_features_output_indices(
             out_features=lowerCamelCase__			,						out_indices=lowerCamelCase__			,						stage_names=self.stage_names       )








__lowercase				      =						[4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
__lowercase				      =						[3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
__lowercase				      =						{
    0: """Sunday""",
    1: """Monday""",
    2: """Tuesday""",
    3: """Wednesday""",
    4: """Thursday""",
    5: """Friday""",
    6: """Saturday""",
}







def 							_lowerCamelCase   (			SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE		,				SCREAMING_SNAKE_CASE   ):
      '''simple docstring'''







      assert len(str(SCREAMING_SNAKE_CASE   )   ) > 2, "year should be in YYYY format"
      assert 1 <= month <= 12, "month should be between 1 to 12"
      assert 1 <= day <= 31, "day should be between 1 to 31"

      # Doomsday algorithm:
      A_							       =		year // 100
      A_							       =		(5 * (century % 4) + 2) % 7
      A_							       =		year % 100
      A_							       =		centurian % 12
      A_							       =		(
          (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
      ) % 7
      A_							       =		(
          DOOMSDAY_NOT_LEAP[month - 1]
          if (year % 4 != 0) or (centurian == 0 and (year % 400) == 0)
          else DOOMSDAY_LEAP[month - 1]
      )
      A_							       =		(dooms_day + day - day_anchor) % 7
      return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
      import doctest

      doctest.testmod()





