





'''simple docstring'''






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


A_		:  Dict		 =						logging.get_logger(__name__)
class 					__snake_case  (					__SCREAMING_SNAKE_CASE		,				__SCREAMING_SNAKE_CASE							):






   '''simple docstring'''





   lowerCamelCase__    							=      '''maskformer-swin'''

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

   def __init__(							self	,		__SCREAMING_SNAKE_CASE=2_2_4	,		__SCREAMING_SNAKE_CASE=4	,		__SCREAMING_SNAKE_CASE=3	,		__SCREAMING_SNAKE_CASE=9_6	,		__SCREAMING_SNAKE_CASE=[2, 2, 6, 2]	,		__SCREAMING_SNAKE_CASE=[3, 6, 1_2, 2_4]	,		__SCREAMING_SNAKE_CASE=7	,		__SCREAMING_SNAKE_CASE=4.0	,		__SCREAMING_SNAKE_CASE=True	,		__SCREAMING_SNAKE_CASE=0.0	,		__SCREAMING_SNAKE_CASE=0.0	,		__SCREAMING_SNAKE_CASE=0.1	,		__SCREAMING_SNAKE_CASE="gelu"	,		__SCREAMING_SNAKE_CASE=False	,		__SCREAMING_SNAKE_CASE=0.02	,		__SCREAMING_SNAKE_CASE=1e-5	,		__SCREAMING_SNAKE_CASE=None	,		__SCREAMING_SNAKE_CASE=None	,		**__SCREAMING_SNAKE_CASE	,		):
    super().__init__(**__SCREAMING_SNAKE_CASE       )

    snake_case__     :					str    =  image_size
    snake_case__     :					Tuple    =  patch_size
    snake_case__     :					Dict    =  num_channels
    snake_case__     :					Optional[Any]    =  embed_dim
    snake_case__     :					List[str]    =  depths
    snake_case__     :					Tuple    =  len(__SCREAMING_SNAKE_CASE       )
    snake_case__     :					int    =  num_heads
    snake_case__     :					int    =  window_size
    snake_case__     :					List[str]    =  mlp_ratio
    snake_case__     :					Union[str, Any]    =  qkv_bias
    snake_case__     :					Optional[Any]    =  hidden_dropout_prob
    snake_case__     :					Optional[int]    =  attention_probs_dropout_prob
    snake_case__     :					Dict    =  drop_path_rate
    snake_case__     :					Optional[Any]    =  hidden_act
    snake_case__     :					Dict    =  use_absolute_embeddings
    snake_case__     :					str    =  layer_norm_eps
    snake_case__     :					int    =  initializer_range
    # we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
    # this indicates the channel dimension after the last stage of the model
    snake_case__     :					str    =  int(embed_dim * 2 ** (len(__SCREAMING_SNAKE_CASE       ) - 1)       )
    snake_case__     :					Optional[Any]    =  ["""stem"""] + [f"stage{idx}" for idx in range(1	,		len(__SCREAMING_SNAKE_CASE       ) + 1       )]
    snake_case__  ,							snake_case__     :					Dict    =  get_aligned_output_features_output_indices(
        out_features=__SCREAMING_SNAKE_CASE	,		out_indices=__SCREAMING_SNAKE_CASE	,		stage_names=self.stage_names       )










def 		lowerCamelCase__       (						):







	'''simple docstring'''





	for n in range(1	,      1000000				):
		yield n * (n + 1) // 2


def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	snake_case_						       =	1
	snake_case_						       =	2
	while i * i <= n:
		snake_case_						       =	0
		while n % i == 0:
			n //= i
			multiplicity += 1
		divisors_count *= multiplicity + 1
		i += 1
	if n > 1:
		divisors_count *= 2
	return divisors_count


def 		lowerCamelCase__       (						):







	'''simple docstring'''





	return next(i for i in triangle_number_generator() if count_divisors(_A				) > 500				)


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