




'''simple docstring'''


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/dinat-mini-in1k-224""": """https://huggingface.co/shi-labs/dinat-mini-in1k-224/resolve/main/config.json""",
    # See all Dinat models at https://huggingface.co/models?filter=dinat
}
class 						a_				(			UpperCAmelCase__     ,						UpperCAmelCase__						):
	lowercase_       :     Any			  =      '''dinat'''

	lowercase_       :     Any			  =      {
	    '''num_attention_heads''': '''num_heads''',
	    '''num_hidden_layers''': '''num_layers''',
	}




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

							__snake_case						 =   patch_size
							__snake_case						 =   num_channels
							__snake_case						 =   embed_dim
							__snake_case						 =   depths
							__snake_case						 =   len(__lowerCAmelCase      )
							__snake_case						 =   num_heads
							__snake_case						 =   kernel_size
							__snake_case						 =   dilations
							__snake_case						 =   mlp_ratio
							__snake_case						 =   qkv_bias
							__snake_case						 =   hidden_dropout_prob
							__snake_case						 =   attention_probs_dropout_prob
							__snake_case						 =   drop_path_rate
							__snake_case						 =   hidden_act
							__snake_case						 =   layer_norm_eps
							__snake_case						 =   initializer_range
							# we set the hidden_size attribute in order to make Dinat work with VisionEncoderDecoderModel
							# this indicates the channel dimension after the last stage of the model
							__snake_case						 =   int(embed_dim * 2 ** (len(__lowerCAmelCase      ) - 1)      )
							__snake_case						 =   layer_scale_init_value
							__snake_case						 =   ['stem'] + [F'stage{idx}' for idx in range(1       ,		len(__lowerCAmelCase      ) + 1      )]
							__snake_case ,       __snake_case						 =   get_aligned_output_features_output_indices(
							    out_features=__lowerCAmelCase       ,		out_indices=__lowerCAmelCase       ,		stage_names=self.stage_names      )







'''simple docstring'''


def 						lowerCamelCase__   (				a							):
						__snake_case						 =   int(a							)
						if n_element < 1:
												__snake_case						 =   ValueError('a should be a positive number'							)
												raise my_error

						__snake_case						 =   [1]
						__snake_case ,       __snake_case ,       __snake_case						 =   (0, 0, 0)
						__snake_case						 =   1
						while index < n_element:
												while hamming_list[i] * 2 <= hamming_list[-1]:
																		i += 1
												while hamming_list[j] * 3 <= hamming_list[-1]:
																		j += 1
												while hamming_list[k] * 5 <= hamming_list[-1]:
																		k += 1
												hamming_list.append(
												    min(hamming_list[i] * 2    ,	hamming_list[j] * 3    ,	hamming_list[k] * 5							)							)
												index += 1
						return hamming_list


if __name__ == "__main__":
	_lowercase  =			input("""Enter the last number (nth term) of the Hamming Number Series: """)
	print("""Formula of Hamming Number Series => 2^i * 3^j * 5^k""")
	_lowercase  =			hamming(int(n))
	print("""-----------------------------------------------------""")
	print(f'''The list with nth numbers is: {hamming_numbers}''')
	print("""-----------------------------------------------------""")

