
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__)



class 		UpperCamelCase__  (       __lowercase    ,__lowercase    ):
   _SCREAMING_SNAKE_CASE      :							Dict	       =      "maskformer-swin"

   _SCREAMING_SNAKE_CASE      :							Optional[Any]	       =      {
       "num_attention_heads": "num_heads",
       "num_hidden_layers": "num_layers",
   }
   def __init__(self :					Optional[int]					,				snake_case_ :					Any=2_2_4					,				snake_case_ :					Dict=4					,				snake_case_ :					Dict=3					,				snake_case_ :					Optional[Any]=9_6					,				snake_case_ :					Tuple=[2, 2, 6, 2]					,				snake_case_ :					Union[str, Any]=[3, 6, 1_2, 2_4]					,				snake_case_ :					int=7					,				snake_case_ :					List[str]=4.0					,				snake_case_ :					List[Any]=True					,				snake_case_ :					Optional[int]=0.0					,				snake_case_ :					List[Any]=0.0					,				snake_case_ :					str=0.1					,				snake_case_ :					Union[str, Any]="gelu"					,				snake_case_ :					Any=False					,				snake_case_ :					int=0.02					,				snake_case_ :					Any=1E-5					,				snake_case_ :					Tuple=None					,				snake_case_ :					List[Any]=None					,				**snake_case_ :					List[Any]					,				):
    super().__init__(**snake_case_   )

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


def    __UpperCamelCase     (				lowerCAmelCase__							:				str  ):
 if n_term == "":
  return []
 __a :  list						=  []
 for temp in range(int(lowerCAmelCase__  )  ):
  series.append(f"1/{temp + 1}" if series else '''1'''  )
 return series


if __name__ == "__main__":
      lowercase__       =input('Enter the last number (nth term) of the Harmonic Series')
      print('Formula of Harmonic Series => 1+1/2+1/3 ..... 1/n')
      print(harmonic_series(nth_term))
