



import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..bit import BitConfig


A__								=						logging.get_logger(__name__)

A__								=						{
    '''Intel/dpt-large''': '''https://huggingface.co/Intel/dpt-large/resolve/main/config.json''',
    # See all DPT models at https://huggingface.co/models?filter=dpt
}


class       a							(			__lowerCamelCase				):
		__lowerCAmelCase	:    List[Any]											=					"""dpt"""



		def __init__(     self     :Union[str, Any]   ,__lowercase     :List[str]=7_6_8   ,__lowercase     :List[str]=1_2   ,__lowercase     :int=1_2   ,__lowercase     :Union[str, Any]=3_0_7_2   ,__lowercase     :List[str]="gelu"   ,__lowercase     :Any=0.0   ,__lowercase     :Any=0.0   ,__lowercase     :List[str]=0.02   ,__lowercase     :Union[str, Any]=1e-1_2   ,__lowercase     :List[str]=3_8_4   ,__lowercase     :Optional[Any]=1_6   ,__lowercase     :Tuple=3   ,__lowercase     :int=False   ,__lowercase     :Any=True   ,__lowercase     :int=[2, 5, 8, 1_1]   ,__lowercase     :Optional[int]="project"   ,__lowercase     :List[Any]=[4, 2, 1, 0.5]   ,__lowercase     :List[str]=[9_6, 1_9_2, 3_8_4, 7_6_8]   ,__lowercase     :List[str]=2_5_6   ,__lowercase     :Union[str, Any]=-1   ,__lowercase     :Tuple=False   ,__lowercase     :Union[str, Any]=True   ,__lowercase     :Any=0.4   ,__lowercase     :Optional[Any]=2_5_5   ,__lowercase     :Union[str, Any]=0.1   ,__lowercase     :int=[1, 1_0_2_4, 2_4, 2_4]   ,__lowercase     :str=[0, 1]   ,__lowercase     :Union[str, Any]=None   ,**__lowercase     :Optional[Any]   ,):
						super().__init__(**__lowercase  )

						snake_case__	:      str     		=	hidden_size
						snake_case__	:      Tuple     		=	is_hybrid

						if self.is_hybrid:
										if backbone_config is None:
														logger.info('''Initializing the config with a `BiT` backbone.'''  )
														snake_case__	:      List[str]     		=	{
														    '''global_padding''': '''same''',
														    '''layer_type''': '''bottleneck''',
														    '''depths''': [3, 4, 9],
														    '''out_features''': ['''stage1''', '''stage2''', '''stage3'''],
														    '''embedding_dynamic_padding''': True,
														}
														snake_case__	:      Optional[int]     		=	BitConfig(**__lowercase  )
										elif isinstance(__lowercase   ,__lowercase  ):
														logger.info('''Initializing the config with a `BiT` backbone.'''  )
														snake_case__	:      List[Any]     		=	BitConfig(**__lowercase  )
										elif isinstance(__lowercase   ,__lowercase  ):
														snake_case__	:      str     		=	backbone_config
										else:
														raise ValueError(
														    F"""backbone_config must be a dictionary or a `PretrainedConfig`, got {backbone_config.__class__}."""  )

										snake_case__	:      Optional[int]     		=	backbone_featmap_shape
										snake_case__	:      str     		=	neck_ignore_stages

										if readout_type != "project":
														raise ValueError('''Readout type must be \'project\' when using `DPT-hybrid` mode.'''  )
						else:
										snake_case__	:      List[str]     		=	None
										snake_case__	:      Dict     		=	None
										snake_case__	:      Any     		=	[]

						snake_case__	:      List[str]     		=	num_hidden_layers
						snake_case__	:      str     		=	num_attention_heads
						snake_case__	:      Optional[Any]     		=	intermediate_size
						snake_case__	:      int     		=	hidden_act
						snake_case__	:      List[Any]     		=	hidden_dropout_prob
						snake_case__	:      Optional[Any]     		=	attention_probs_dropout_prob
						snake_case__	:      Union[str, Any]     		=	initializer_range
						snake_case__	:      Any     		=	layer_norm_eps
						snake_case__	:      str     		=	image_size
						snake_case__	:      Dict     		=	patch_size
						snake_case__	:      Optional[Any]     		=	num_channels
						snake_case__	:      Any     		=	qkv_bias
						snake_case__	:      Tuple     		=	backbone_out_indices
						if readout_type not in ["ignore", "add", "project"]:
										raise ValueError('''Readout_type must be one of [\'ignore\', \'add\', \'project\']'''  )
						snake_case__	:      List[Any]     		=	readout_type
						snake_case__	:      str     		=	reassemble_factors
						snake_case__	:      List[Any]     		=	neck_hidden_sizes
						snake_case__	:      Optional[Any]     		=	fusion_hidden_size
						snake_case__	:      Optional[Any]     		=	head_in_index
						snake_case__	:      Optional[Any]     		=	use_batch_norm_in_fusion_residual
						# auxiliary head attributes (semantic segmentation)
						snake_case__	:      Tuple     		=	use_auxiliary_head
						snake_case__	:      Tuple     		=	auxiliary_loss_weight
						snake_case__	:      str     		=	semantic_loss_ignore_index
						snake_case__	:      List[str]     		=	semantic_classifier_dropout






		def 	__lowerCamelCase			(     self     :Any  ):
						snake_case__	:      Optional[int]     		=	copy.deepcopy(self.__dict__  )

						if output["backbone_config"] is not None:
										snake_case__	:      Optional[Any]     		=	self.backbone_config.to_dict()

						snake_case__	:      int     		=	self.__class__.model_type
						return output






A__								=						[4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
A__								=						[3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
A__								=						{
    0: '''Sunday''',
    1: '''Monday''',
    2: '''Tuesday''',
    3: '''Wednesday''',
    4: '''Thursday''',
    5: '''Friday''',
    6: '''Saturday''',
}



def 			_lowerCAmelCase       (					__lowerCAmelCase  ,  __lowerCAmelCase  ,  __lowerCAmelCase      )   ->					str:


				"""simple docstring"""

				assert len(str(__lowerCAmelCase      )      ) > 2, "year should be in YYYY format"
				assert 1 <= month <= 12, "month should be between 1 to 12"
				assert 1 <= day <= 31, "day should be between 1 to 31"

				# Doomsday algorithm:
				snake_case__	:      Optional[int]     		=	year // 100
				snake_case__	:      List[str]     		=	(5 * (century % 4) + 2) % 7
				snake_case__	:      Dict     		=	year % 100
				snake_case__	:      Union[str, Any]     		=	centurian % 12
				snake_case__	:      List[Any]     		=	(
				    (centurian // 12) + centurian_m + (centurian_m // 4) + century_anchor
				) % 7
				snake_case__	:      List[str]     		=	(
				    DOOMSDAY_NOT_LEAP[month - 1]
				    if (year % 4 != 0) or (centurian == 0 and (year % 400) == 0)
				    else DOOMSDAY_LEAP[month - 1]
				)
				snake_case__	:      List[str]     		=	(dooms_day + day - day_anchor) % 7
				return WEEK_DAY_NAMES[week_day]


if __name__ == "__main__":
				import doctest

				doctest.testmod()

