




"""simple docstring"""


import copy

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


A_      			=       logging.get_logger(__name__)

A_      			=       {
    '''SenseTime/deformable-detr''': '''https://huggingface.co/sensetime/deformable-detr/resolve/main/config.json''',
    # See all Deformable DETR models at https://huggingface.co/models?filter=deformable-detr
}






class       lowercase(  __a				):







 '''simple docstring'''





 lowercase__				      =      "deformable_detr"
 lowercase__				      =      {
     "hidden_size": "d_model",
     "num_attention_heads": "encoder_attention_heads",
 }


 def __init__(       self:	Tuple,   a_:	List[str]=True,   a_:	str=None,   a_:	Tuple=3,   a_:	Optional[int]=300,   a_:	List[Any]=1_024,   a_:	Union[str, Any]=6,   a_:	int=1_024,   a_:	Optional[int]=8,   a_:	Tuple=6,   a_:	List[str]=1_024,   a_:	Dict=8,   a_:	str=0.0,   a_:	Dict=True,   a_:	Any="relu",   a_:	List[str]=256,   a_:	List[Any]=0.1,   a_:	List[Any]=0.0,   a_:	Optional[int]=0.0,   a_:	Tuple=0.02,   a_:	List[Any]=1.0,   a_:	Union[str, Any]=True,   a_:	Dict=False,   a_:	List[str]="sine",   a_:	Optional[int]="resnet50",   a_:	List[str]=True,   a_:	Optional[Any]=False,   a_:	Tuple=4,   a_:	List[str]=4,   a_:	Tuple=4,   a_:	List[Any]=False,   a_:	List[Any]=300,   a_:	Dict=False,   a_:	Optional[int]=1,   a_:	int=5,   a_:	Union[str, Any]=2,   a_:	Optional[int]=1,   a_:	Tuple=1,   a_:	Tuple=5,   a_:	int=2,   a_:	Tuple=0.1,   a_:	Dict=0.25,   a_:	str=False,   **a_:	Dict,   ):




   '''simple docstring'''



   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."""	)
       _snake_case							:	str			=						CONFIG_MAPPING["""resnet"""](out_features=["""stage4"""]	)
     elif isinstance(a_,   a_	):
       _snake_case							:	List[Any]			=						backbone_config.get("""model_type"""	)
       _snake_case							:	int			=						CONFIG_MAPPING[backbone_model_type]
       _snake_case							:	Optional[Any]			=						config_class.from_dict(a_	)
   _snake_case							:	Any			=						use_timm_backbone
   _snake_case							:	List[str]			=						backbone_config
   _snake_case							:	int			=						num_channels
   _snake_case							:	Any			=						num_queries
   _snake_case							:	str			=						max_position_embeddings
   _snake_case							:	int			=						d_model
   _snake_case							:	Optional[int]			=						encoder_ffn_dim
   _snake_case							:	List[str]			=						encoder_layers
   _snake_case							:	int			=						encoder_attention_heads
   _snake_case							:	str			=						decoder_ffn_dim
   _snake_case							:	int			=						decoder_layers
   _snake_case							:	List[Any]			=						decoder_attention_heads
   _snake_case							:	int			=						dropout
   _snake_case							:	Tuple			=						attention_dropout
   _snake_case							:	int			=						activation_dropout
   _snake_case							:	List[str]			=						activation_function
   _snake_case							:	List[Any]			=						init_std
   _snake_case							:	int			=						init_xavier_std
   _snake_case							:	Optional[int]			=						encoder_layerdrop
   _snake_case							:	int			=						auxiliary_loss
   _snake_case							:	Any			=						position_embedding_type
   _snake_case							:	Optional[Any]			=						backbone
   _snake_case							:	Tuple			=						use_pretrained_backbone
   _snake_case							:	int			=						dilation
   # deformable attributes
   _snake_case							:	str			=						num_feature_levels
   _snake_case							:	str			=						encoder_n_points
   _snake_case							:	Optional[int]			=						decoder_n_points
   _snake_case							:	str			=						two_stage
   _snake_case							:	Optional[int]			=						two_stage_num_proposals
   _snake_case							:	Dict			=						with_box_refine
   if two_stage is True and with_box_refine is False:
     raise ValueError("""If two_stage is True, with_box_refine must be True."""	)
   # Hungarian matcher
   _snake_case							:	Tuple			=						class_cost
   _snake_case							:	List[Any]			=						bbox_cost
   _snake_case							:	List[str]			=						giou_cost
   # Loss coefficients
   _snake_case							:	List[Any]			=						mask_loss_coefficient
   _snake_case							:	List[str]			=						dice_loss_coefficient
   _snake_case							:	Any			=						bbox_loss_coefficient
   _snake_case							:	Dict			=						giou_loss_coefficient
   _snake_case							:	Any			=						eos_coefficient
   _snake_case							:	str			=						focal_alpha
   _snake_case							:	int			=						disable_custom_kernels
   super().__init__(is_encoder_decoder=a_,   **a_	)


 @property
 def 				UpperCamelCase_     (       self:	Any	):




   '''simple docstring'''



   return self.encoder_attention_heads


 @property
 def 				UpperCamelCase_     (       self:	int	):




   '''simple docstring'''



   return self.d_model


 def 				UpperCamelCase_     (       self:	str	):




   '''simple docstring'''



   _snake_case							:	Any			=						copy.deepcopy(self.__dict__	)
   if self.backbone_config is not None:
     _snake_case							:	Dict			=						self.backbone_config.to_dict()
   _snake_case							:	int			=						self.__class__.model_type
   return output








"""simple docstring"""


from __future__ import annotations

import math


def       UpperCAmelCase__ (snake_case__							:      int					):
  """simple docstring"""

  if 1 < number < 4:
    # 2 and 3 are primes
    return True
  elif number < 2 or number % 2 == 0 or number % 3 == 0:
    # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
    return False

  # All primes number are in format of 6k +/- 1
  for i in range(5	,     int(math.sqrt(snake_case__					) + 1					)	,     6					):
    if number % i == 0 or number % (i + 2) == 0:
      return False
  return True


A_      			=       [num for num in range(3, 10_00_01, 2) if not is_prime(num)]


def       UpperCAmelCase__ (snake_case__							:      int					):
  """simple docstring"""

  if not isinstance(snake_case__	,     snake_case__					):
    raise ValueError("""n must be an integer"""					)
  if n <= 0:
    raise ValueError("""n must be >= 0"""					)

  _snake_case							:	Any			=						[]
  for num in range(len(snake_case__					)					):
    _snake_case							:	Optional[int]			=						0
    while 2 * i * i <= odd_composites[num]:
      _snake_case							:	Optional[int]			=						odd_composites[num] - 2 * i * i
      if is_prime(snake_case__					):
        break
      i += 1
    else:
      list_nums.append(odd_composites[num]					)
      if len(snake_case__					) == n:
        return list_nums

  return []


def       UpperCAmelCase__ ():
  """simple docstring"""

  return compute_nums(1					)[0]


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


