






"""simple docstring"""



import copy
from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ..auto import CONFIG_MAPPING


_UpperCamelCase		:  Tuple						=		logging.get_logger(__name__)

_UpperCamelCase		:  str						=		{
    'microsoft/conditional-detr-resnet-50': (
        'https://huggingface.co/microsoft/conditional-detr-resnet-50/resolve/main/config.json'
    ),
}

class        a     (   a_	):
    UpperCAmelCase_ :     Optional[Any]	     ="conditional_detr"
    UpperCAmelCase_ :     str	     =["past_key_values"]
    UpperCAmelCase_ :     str	     ={
        "hidden_size": "d_model",
        "num_attention_heads": "encoder_attention_heads",
    }







    def __init__(			self							,		_lowerCamelCase=True							,		_lowerCamelCase=None							,		_lowerCamelCase=3							,		_lowerCamelCase=3_0_0							,		_lowerCamelCase=6							,		_lowerCamelCase=2_0_4_8							,		_lowerCamelCase=8							,		_lowerCamelCase=6							,		_lowerCamelCase=2_0_4_8							,		_lowerCamelCase=8							,		_lowerCamelCase=0.0							,		_lowerCamelCase=0.0							,		_lowerCamelCase=True							,		_lowerCamelCase="relu"							,		_lowerCamelCase=2_5_6							,		_lowerCamelCase=0.1							,		_lowerCamelCase=0.0							,		_lowerCamelCase=0.0							,		_lowerCamelCase=0.0_2							,		_lowerCamelCase=1.0							,		_lowerCamelCase=False							,		_lowerCamelCase="sine"							,		_lowerCamelCase="resnet50"							,		_lowerCamelCase=True							,		_lowerCamelCase=False							,		_lowerCamelCase=2							,		_lowerCamelCase=5							,		_lowerCamelCase=2							,		_lowerCamelCase=1							,		_lowerCamelCase=1							,		_lowerCamelCase=2							,		_lowerCamelCase=5							,		_lowerCamelCase=2							,		_lowerCamelCase=0.2_5							,		**_lowerCamelCase							,		):
      if backbone_config is not None and use_timm_backbone:
        raise ValueError('You can\'t specify both `backbone_config` and `use_timm_backbone`.'       )

      if not use_timm_backbone:
        if backbone_config is None:
          logger.info('`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.'       )
          lowercase							    =       CONFIG_MAPPING['resnet'](out_features=['stage4']       )
        elif isinstance(_lowerCamelCase							,		_lowerCamelCase       ):
          lowercase							    =       backbone_config.get('model_type'       )
          lowercase							    =       CONFIG_MAPPING[backbone_model_type]
          lowercase							    =       config_class.from_dict(_lowerCamelCase       )

      lowercase							    =       use_timm_backbone
      lowercase							    =       backbone_config
      lowercase							    =       num_channels
      lowercase							    =       num_queries
      lowercase							    =       d_model
      lowercase							    =       encoder_ffn_dim
      lowercase							    =       encoder_layers
      lowercase							    =       encoder_attention_heads
      lowercase							    =       decoder_ffn_dim
      lowercase							    =       decoder_layers
      lowercase							    =       decoder_attention_heads
      lowercase							    =       dropout
      lowercase							    =       attention_dropout
      lowercase							    =       activation_dropout
      lowercase							    =       activation_function
      lowercase							    =       init_std
      lowercase							    =       init_xavier_std
      lowercase							    =       encoder_layerdrop
      lowercase							    =       decoder_layerdrop
      lowercase							    =       encoder_layers
      lowercase							    =       auxiliary_loss
      lowercase							    =       position_embedding_type
      lowercase							    =       backbone
      lowercase							    =       use_pretrained_backbone
      lowercase							    =       dilation
      # Hungarian matcher
      lowercase							    =       class_cost
      lowercase							    =       bbox_cost
      lowercase							    =       giou_cost
      # Loss coefficients
      lowercase							    =       mask_loss_coefficient
      lowercase							    =       dice_loss_coefficient
      lowercase							    =       cls_loss_coefficient
      lowercase							    =       bbox_loss_coefficient
      lowercase							    =       giou_loss_coefficient
      lowercase							    =       focal_alpha
      super().__init__(is_encoder_decoder=_lowerCamelCase							,		**_lowerCamelCase       )







    @property
    def 			UpperCamelCase_      (			self       ):
      return self.encoder_attention_heads







    @property
    def 			UpperCamelCase_      (			self       ):
      return self.d_model







    def 			UpperCamelCase_      (			self       ):
      lowercase							    =       copy.deepcopy(self.__dict__       )
      if self.backbone_config is not None:
        lowercase							    =       self.backbone_config.to_dict()
      lowercase							    =       self.__class__.model_type
      return output


class        a     (   a_	):
    UpperCAmelCase_ :     Optional[Any]	     =version.parse("1.11"	)







    @property
    def 			UpperCamelCase_      (			self       ):
      return OrderedDict(
          [
              ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
              ('pixel_mask', {0: 'batch'}),
          ]       )







    @property
    def 			UpperCamelCase_      (			self       ):
      return 1e-5







    @property
    def 			UpperCamelCase_      (			self       ):
      return 1_2










"""simple docstring"""



def 						_SCREAMING_SNAKE_CASE (    __snake_case			:  int    ):





  '''simple docstring'''





  return sum(i for i in range(1		,					number // 2 + 1    ) if number % i == 0    ) == number


if __name__ == "__main__":
    print('Program to check whether a number is a Perfect number or not...')
    _UpperCamelCase		:  Tuple						=		int(input('Enter number: ').strip())
    print(F'''{number} is {'' if perfect(number) else 'not '}a Perfect Number.''')


