



'''simple docstring'''





import copy
from typing import Dict, Optional

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto import CONFIG_MAPPING
from ..detr import DetrConfig
from ..swin import SwinConfig


__a  			=						{
    "facebook/maskformer-swin-base-ade": (
        "https://huggingface.co/facebook/maskformer-swin-base-ade/blob/main/config.json"
    )
    # See all MaskFormer models at https://huggingface.co/models?filter=maskformer
}

__a  			=						logging.get_logger(__name__)







class        UpperCAmelCase_			(			_a      ):
    """simple docstring"""







    lowercase   =						"maskformer"
    lowercase   =						{"hidden_size": "mask_feature_size"}
    lowercase   =						["resnet", "swin"]
    lowercase   =						["detr"]




    def __init__(       self   :	Union[str, Any]					,	snake_case_   :	int = 256					,	snake_case_   :	int = 256					,	snake_case_   :	float = 0.1					,	snake_case_   :	bool = False					,	snake_case_   :	Optional[Dict] = None					,	snake_case_   :	Optional[Dict] = None					,	snake_case_   :	float = 0.02					,	snake_case_   :	float = 1.0					,	snake_case_   :	float = 1.0					,	snake_case_   :	float = 1.0					,	snake_case_   :	float = 20.0					,	snake_case_   :	Optional[bool] = None					,	**snake_case_   :	Tuple					,	):
          if backbone_config is None:
                # fall back to https://huggingface.co/microsoft/swin-base-patch4-window12-384-in22k
                snake_case__    :       Dict       		= SwinConfig(
                    image_size=384					,	in_channels=3					,	patch_size=4					,	embed_dim=128					,	depths=[2, 2, 18, 2]					,	num_heads=[4, 8, 16, 32]					,	window_size=12					,	drop_path_rate=0.3					,	out_features=["""stage1""", """stage2""", """stage3""", """stage4"""]					,	)

          if isinstance(snake_case_					,	snake_case_		):
                snake_case__    :       Any       		= backbone_config.pop("""model_type"""		)
                snake_case__    :       Dict       		= CONFIG_MAPPING[backbone_model_type]
                snake_case__    :       List[str]       		= config_class.from_dict(snake_case_		)

          # verify that the backbone is supported
          if backbone_config.model_type not in self.backbones_supported:
                logger.warning_once(
                    f"Backbone {backbone_config.model_type} is not a supported model and may not be compatible with MaskFormer. "
                    f"Supported model types: {','.join(self.backbones_supported		)}"		)

          if decoder_config is None:
                # fall back to https://huggingface.co/facebook/detr-resnet-50
                snake_case__    :       List[Any]       		= DetrConfig()
          else:
                # verify that the decoder is supported
                snake_case__    :       int       		= (
                    decoder_config.pop("""model_type"""		) if isinstance(snake_case_					,	snake_case_		) else decoder_config.model_type
                )
                if decoder_type not in self.decoders_supported:
                      raise ValueError(
                          f"Transformer Decoder {decoder_type} not supported, please use one of"
                          f" {','.join(self.decoders_supported		)}"		)
                if isinstance(snake_case_					,	snake_case_		):
                      snake_case__    :       List[Any]       		= CONFIG_MAPPING[decoder_type]
                      snake_case__    :       Union[str, Any]       		= config_class.from_dict(snake_case_		)

          snake_case__    :       Optional[int]       		= backbone_config
          snake_case__    :       Optional[Any]       		= decoder_config
          # main feature dimension for the model
          snake_case__    :       int       		= fpn_feature_size
          snake_case__    :       List[str]       		= mask_feature_size
          # initializer
          snake_case__    :       Dict       		= init_std
          snake_case__    :       List[str]       		= init_xavier_std
          # Hungarian matcher && loss
          snake_case__    :       Optional[Any]       		= cross_entropy_weight
          snake_case__    :       Union[str, Any]       		= dice_weight
          snake_case__    :       List[Any]       		= mask_weight
          snake_case__    :       List[Any]       		= use_auxiliary_loss
          snake_case__    :       Tuple       		= no_object_weight
          snake_case__    :       Optional[int]       		= output_auxiliary_logits

          snake_case__    :       Union[str, Any]       		= self.decoder_config.encoder_attention_heads
          snake_case__    :       List[Any]       		= self.decoder_config.num_hidden_layers
          super().__init__(**snake_case_		)




    @classmethod
    def lowerCamelCase			(       cls   :	Optional[int]					,	snake_case_   :	PretrainedConfig					,	snake_case_   :	PretrainedConfig					,	**snake_case_   :	Optional[Any]		):
          return cls(
              backbone_config=snake_case_					,	decoder_config=snake_case_					,	**snake_case_					,	)




    def lowerCamelCase			(       self   :	Union[str, Any]		):
          snake_case__    :       str       		= copy.deepcopy(self.__dict__		)
          snake_case__    :       int       		= self.backbone_config.to_dict()
          snake_case__    :       Optional[int]       		= self.decoder_config.to_dict()
          snake_case__    :       Union[str, Any]       		= self.__class__.model_type
          return output





'''simple docstring'''





import sys

__a  			=						(
    "73167176531330624919225119674426574742355349194934"
    "96983520312774506326239578318016984801869478851843"
    "85861560789112949495459501737958331952853208805511"
    "12540698747158523863050715693290963295227443043557"
    "66896648950445244523161731856403098711121722383113"
    "62229893423380308135336276614282806444486645238749"
    "30358907296290491560440772390713810515859307960866"
    "70172427121883998797908792274921901699720888093776"
    "65727333001053367881220235421809751254540594752243"
    "52584907711670556013604839586446706324415722155397"
    "53697817977846174064955149290862569321978468622482"
    "83972241375657056057490261407972968652414535100474"
    "82166370484403199890008895243450658541227588666881"
    "16427171479924442928230863465674813919123162824586"
    "17866458359124566529476545682848912883142607690042"
    "24219022671055626321111109370544217506941658960408"
    "07198403850962455444362981230987879927244284909188"
    "84580156166097919133875499200524063689912560717606"
    "05886116467109405077541002256983155200055935729725"
    "71636269561882670428252483600823257530420752963450"
)





def 		__snake_case(							_lowerCAmelCase = N						)						->					int:
      snake_case__    :       Dict       		= -sys.maxsize - 1
      for i in range(len(_lowerCAmelCase						) - 12						):
            snake_case__    :       Any       		= 1
            for j in range(13						):
                  product *= int(n[i + j]						)
            if product > largest_product:
                  snake_case__    :       List[str]       		= product
      return largest_product


if __name__ == "__main__":
       print(F"{solution() = }")
