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       :	Optional[int]									=     {
    "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 						A(		UpperCamelCase							,   UpperCamelCase     ):



 '''simple docstring'''


 UpperCamelCase		     =		'''nat'''

 UpperCamelCase		     =		{
     '''num_attention_heads''': '''num_heads''',
     '''num_hidden_layers''': '''num_layers''',
 }

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

       """simple docstring"""






       super().__init__(**A_						)

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









from __future__ import annotations

from fractions import Fraction

def     _SCREAMING_SNAKE_CASE    (							lowercase			: int			,							lowercase			: int  ):


      '''simple docstring'''



      return (
          num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
      )

def     _SCREAMING_SNAKE_CASE    (							lowercase			: int  ):


      '''simple docstring'''



      lowerCamelCase_	  =					[]
      lowerCamelCase_	  =					11
      lowerCamelCase_	  =					int('1' + '0' * digit_len  )
      for num in range(lowercase			,							lowercase  ):
            while den <= 99:
                  if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
                        if is_digit_cancelling(lowercase			,							lowercase  ):
                              solutions.append(f"""{num}/{den}"""  )
                  den += 1
            num += 1
            lowerCamelCase_	  =					10
      return solutions

def     _SCREAMING_SNAKE_CASE    (							lowercase			: int = 2  ):


      '''simple docstring'''



      lowerCamelCase_	  =					1.0
      for fraction in fraction_list(lowercase  ):
            lowerCamelCase_	  =					Fraction(lowercase  )
            result *= frac.denominator / frac.numerator
      return int(lowercase  )


if __name__ == "__main__":
 print(solution())



