



'''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


__lowerCAmelCase									=   logging.get_logger(__name__)

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

class 	__magic_name__						(    _UpperCamelCase   ):
							lowerCAmelCase       :    Any   				=					'conditional_detr'
							lowerCAmelCase       :    List[str]   				=					['past_key_values']
							lowerCAmelCase       :    Optional[int]   				=					{
							    'hidden_size': 'd_model',
							    'num_attention_heads': 'encoder_attention_heads',
							}







							def __init__(							self					:       Optional[int]	,_UpperCAmelCase					:       Optional[int]=True	,_UpperCAmelCase					:       Union[str, Any]=None	,_UpperCAmelCase					:       List[Any]=3	,_UpperCAmelCase					:       List[Any]=300	,_UpperCAmelCase					:       Dict=6	,_UpperCAmelCase					:       List[str]=2048	,_UpperCAmelCase					:       Optional[int]=8	,_UpperCAmelCase					:       List[Any]=6	,_UpperCAmelCase					:       Optional[int]=2048	,_UpperCAmelCase					:       Dict=8	,_UpperCAmelCase					:       int=0.0	,_UpperCAmelCase					:       Optional[Any]=0.0	,_UpperCAmelCase					:       Optional[Any]=True	,_UpperCAmelCase					:       str="relu"	,_UpperCAmelCase					:       Tuple=256	,_UpperCAmelCase					:       Optional[int]=0.1	,_UpperCAmelCase					:       str=0.0	,_UpperCAmelCase					:       Optional[int]=0.0	,_UpperCAmelCase					:       Union[str, Any]=0.02	,_UpperCAmelCase					:       List[str]=1.0	,_UpperCAmelCase					:       Any=False	,_UpperCAmelCase					:       int="sine"	,_UpperCAmelCase					:       List[str]="resnet50"	,_UpperCAmelCase					:       Optional[int]=True	,_UpperCAmelCase					:       str=False	,_UpperCAmelCase					:       str=2	,_UpperCAmelCase					:       int=5	,_UpperCAmelCase					:       Optional[int]=2	,_UpperCAmelCase					:       str=1	,_UpperCAmelCase					:       Union[str, Any]=1	,_UpperCAmelCase					:       List[str]=2	,_UpperCAmelCase					:       Union[str, Any]=5	,_UpperCAmelCase					:       List[Any]=2	,_UpperCAmelCase					:       Optional[int]=0.25	,**_UpperCAmelCase					:       Tuple	,):
									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.'		)
													_a     :      Optional[Any]        =							CONFIG_MAPPING['resnet'](out_features=['stage4']		)
											elif isinstance(_UpperCAmelCase	,_UpperCAmelCase		):
													_a     :      str        =							backbone_config.get('model_type'		)
													_a     :      Union[str, Any]        =							CONFIG_MAPPING[backbone_model_type]
													_a     :      List[Any]        =							config_class.from_dict(_UpperCAmelCase		)

									_a     :      Tuple        =							use_timm_backbone
									_a     :      Union[str, Any]        =							backbone_config
									_a     :      List[Any]        =							num_channels
									_a     :      Union[str, Any]        =							num_queries
									_a     :      Optional[Any]        =							d_model
									_a     :      Tuple        =							encoder_ffn_dim
									_a     :      Dict        =							encoder_layers
									_a     :      List[str]        =							encoder_attention_heads
									_a     :      Union[str, Any]        =							decoder_ffn_dim
									_a     :      Optional[int]        =							decoder_layers
									_a     :      int        =							decoder_attention_heads
									_a     :      Optional[int]        =							dropout
									_a     :      Tuple        =							attention_dropout
									_a     :      List[Any]        =							activation_dropout
									_a     :      str        =							activation_function
									_a     :      Optional[Any]        =							init_std
									_a     :      Union[str, Any]        =							init_xavier_std
									_a     :      List[Any]        =							encoder_layerdrop
									_a     :      List[Any]        =							decoder_layerdrop
									_a     :      Dict        =							encoder_layers
									_a     :      List[Any]        =							auxiliary_loss
									_a     :      Optional[int]        =							position_embedding_type
									_a     :      List[Any]        =							backbone
									_a     :      Optional[int]        =							use_pretrained_backbone
									_a     :      Optional[int]        =							dilation
									# Hungarian matcher
									_a     :      Tuple        =							class_cost
									_a     :      str        =							bbox_cost
									_a     :      Any        =							giou_cost
									# Loss coefficients
									_a     :      Tuple        =							mask_loss_coefficient
									_a     :      Dict        =							dice_loss_coefficient
									_a     :      Tuple        =							cls_loss_coefficient
									_a     :      Any        =							bbox_loss_coefficient
									_a     :      Dict        =							giou_loss_coefficient
									_a     :      Union[str, Any]        =							focal_alpha
									super().__init__(is_encoder_decoder=_UpperCAmelCase	,**_UpperCAmelCase		)







							@property
							def 							__lowercase			(							self					:       Dict		):
									return self.encoder_attention_heads







							@property
							def 							__lowercase			(							self					:       str		):
									return self.d_model







							def 							__lowercase			(							self					:       int		):
									_a     :      List[str]        =							copy.deepcopy(self.__dict__		)
									if self.backbone_config is not None:
											_a     :      Dict        =							self.backbone_config.to_dict()
									_a     :      Union[str, Any]        =							self.__class__.model_type
									return output

class 	__magic_name__						(    _UpperCamelCase   ):
							lowerCAmelCase       :    str   				=					version.parse('1.11'   )







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







							@property
							def 							__lowercase			(							self					:       Any		):
									return 1E-5







							@property
							def 							__lowercase			(							self					:       List[Any]		):
									return 12









'''simple docstring'''

def      __lowerCamelCase     (      )			->      Tuple:
		for n in range(1						,			1000000  ):
				yield n * (n + 1) // 2



def      __lowerCamelCase     (      lowerCAmelCase_  )			->      List[Any]:
		_a     :      Any        =							1
		_a     :      Tuple        =							2
		while i * i <= n:
				_a     :      Tuple        =							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     (      )			->      str:
		return next(i for i in triangle_number_generator() if count_divisors(lowerCAmelCase_  ) > 500  )


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




