



'''simple docstring'''





import copy

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


lowercase_	 =						logging.get_logger(__name__)

lowercase_	 =						{
    "ut/deta": "https://huggingface.co/ut/deta/resolve/main/config.json",
}






class __A    (						A		):



	'''simple docstring'''







	__lowerCamelCase					: int    = 'deta'
	__lowerCamelCase					: Union[str, Any]    = {
	    'hidden_size': 'd_model',
	    'num_attention_heads': 'encoder_attention_heads',
	}



	def __init__(self				,     A=None				,     A=900				,     A=2_048				,     A=6				,     A=2_048				,     A=8				,     A=6				,     A=1_024				,     A=8				,     A=0.0				,     A=True				,     A="relu"				,     A=256				,     A=0.1				,     A=0.0				,     A=0.0				,     A=0.02				,     A=1.0				,     A=True				,     A=False				,     A="sine"				,     A=5				,     A=4				,     A=4				,     A=True				,     A=300				,     A=True				,     A=True				,     A=1				,     A=5				,     A=2				,     A=1				,     A=1				,     A=5				,     A=2				,     A=0.1				,     A=0.25				,     **A				,     )					->  Optional[int]:


						"""simple docstring"""



						if backbone_config is None:
											logger.info('''`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.''' )
											_a											=						CONFIG_MAPPING['''resnet'''](out_features=['''stage2''', '''stage3''', '''stage4'''] )
						else:
											if isinstance(A				,     A ):
																_a											=						backbone_config.pop('''model_type''' )
																_a											=						CONFIG_MAPPING[backbone_model_type]
																_a											=						config_class.from_dict(A )

						_a											=						backbone_config
						_a											=						num_queries
						_a											=						max_position_embeddings
						_a											=						d_model
						_a											=						encoder_ffn_dim
						_a											=						encoder_layers
						_a											=						encoder_attention_heads
						_a											=						decoder_ffn_dim
						_a											=						decoder_layers
						_a											=						decoder_attention_heads
						_a											=						dropout
						_a											=						attention_dropout
						_a											=						activation_dropout
						_a											=						activation_function
						_a											=						init_std
						_a											=						init_xavier_std
						_a											=						encoder_layerdrop
						_a											=						auxiliary_loss
						_a											=						position_embedding_type
						# deformable attributes
						_a											=						num_feature_levels
						_a											=						encoder_n_points
						_a											=						decoder_n_points
						_a											=						two_stage
						_a											=						two_stage_num_proposals
						_a											=						with_box_refine
						_a											=						assign_first_stage
						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
						_a											=						class_cost
						_a											=						bbox_cost
						_a											=						giou_cost
						# Loss coefficients
						_a											=						mask_loss_coefficient
						_a											=						dice_loss_coefficient
						_a											=						bbox_loss_coefficient
						_a											=						giou_loss_coefficient
						_a											=						eos_coefficient
						_a											=						focal_alpha
						super().__init__(is_encoder_decoder=A				,     **A )



	@property
	def       a__						(self )					->  int:


						"""simple docstring"""



						return self.encoder_attention_heads



	@property
	def       a__						(self )					->  int:


						"""simple docstring"""



						return self.d_model



	def       a__						(self )					->  str:


						"""simple docstring"""



						_a											=						copy.deepcopy(self.__dict__ )
						_a											=						self.backbone_config.to_dict()
						_a											=						self.__class__.model_type
						return output








'''simple docstring'''





from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase_	 =						logging.get_logger(__name__)

lowercase_	 =						{
    "google/pegasus-large": "https://huggingface.co/google/pegasus-large/resolve/main/config.json",
    # See all PEGASUS models at https://huggingface.co/models?filter=pegasus
}






class __A    (						A		):



 '''simple docstring'''







 __lowerCamelCase					: Union[str, Any]    = 'pegasus'
 __lowerCamelCase					: Tuple    = ['past_key_values']
 __lowerCamelCase					: List[Any]    = {'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}



 def __init__(self				,     A=50_265				,     A=1_024				,     A=12				,     A=4_096				,     A=16				,     A=12				,     A=4_096				,     A=16				,     A=0.0				,     A=0.0				,     A=True				,     A=True				,     A="gelu"				,     A=1_024				,     A=0.1				,     A=0.0				,     A=0.0				,     A=0.02				,     A=0				,     A=False				,     A=0				,     A=1				,     A=1				,     **A				,     )					->  str:


      """simple docstring"""



      _a											=						vocab_size
      _a											=						max_position_embeddings
      _a											=						d_model
      _a											=						encoder_ffn_dim
      _a											=						encoder_layers
      _a											=						encoder_attention_heads
      _a											=						decoder_ffn_dim
      _a											=						decoder_layers
      _a											=						decoder_attention_heads
      _a											=						dropout
      _a											=						attention_dropout
      _a											=						activation_dropout
      _a											=						activation_function
      _a											=						init_std
      _a											=						encoder_layerdrop
      _a											=						decoder_layerdrop
      _a											=						use_cache
      _a											=						encoder_layers
      _a											=						scale_embedding  # scale factor will be sqrt(d_model) if True
      super().__init__(
          pad_token_id=A				,     eos_token_id=A				,     is_encoder_decoder=A				,     decoder_start_token_id=A				,     forced_eos_token_id=A				,     **A				,     )



 @property
 def       a__						(self )					->  int:


      """simple docstring"""



      return self.encoder_attention_heads



 @property
 def       a__						(self )					->  int:


      """simple docstring"""



      return self.d_model



