"""simple docstring"""







import copy

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


_a  :  int=				logging.get_logger(__name__)

class 	UpperCamelCase    (					lowercase		):
				UpperCAmelCase       :   str					=	"""upernet"""



				def __init__(self       :   Union[str, Any]			,						_A       :   Tuple=None			,						_A       :   Dict=5_12			,						_A       :   Dict=0.02			,						_A       :   Any=[1, 2, 3, 6]			,						_A       :   List[str]=True			,						_A       :   int=0.4			,						_A       :   List[str]=3_84			,						_A       :   Any=2_56			,						_A       :   Dict=1			,						_A       :   List[str]=False			,						_A       :   Tuple=2_55			,						**_A       :   int			,						)					->			Optional[Any]:
					super().__init__(**_A)

					if backbone_config is None:
						logger.info('`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.')
						__snake_case    :							Optional[Any]   	=				CONFIG_MAPPING['resnet'](out_features=['stage1', 'stage2', 'stage3', 'stage4'])
					elif isinstance(_A			,						_A):
						__snake_case    :							Union[str, Any]   	=				backbone_config.get('model_type')
						__snake_case    :							str   	=				CONFIG_MAPPING[backbone_model_type]
						__snake_case    :							str   	=				config_class.from_dict(_A)

					__snake_case    :							List[str]   	=				backbone_config
					__snake_case    :							str   	=				hidden_size
					__snake_case    :							int   	=				initializer_range
					__snake_case    :							Dict   	=				pool_scales
					__snake_case    :							Optional[int]   	=				use_auxiliary_head
					__snake_case    :							Optional[Any]   	=				auxiliary_loss_weight
					__snake_case    :							int   	=				auxiliary_in_channels
					__snake_case    :							Union[str, Any]   	=				auxiliary_channels
					__snake_case    :							str   	=				auxiliary_num_convs
					__snake_case    :							Union[str, Any]   	=				auxiliary_concat_input
					__snake_case    :							Dict   	=				loss_ignore_index






				def       _lowercase  (self       :   Union[str, Any])					->			Tuple:
					__snake_case    :							Any   	=				copy.deepcopy(self.__dict__)
					__snake_case    :							Tuple   	=				self.backbone_config.to_dict()
					__snake_case    :							str   	=				self.__class__.model_type
					return output






"""simple docstring"""







from abc import ABC, abstractmethod
from argparse import ArgumentParser

class 	UpperCamelCase    (					lowercase		):



				@staticmethod
				@abstractmethod
				def       _lowercase  (_A       :   ArgumentParser)					->			Tuple:
					raise NotImplementedError()






				@abstractmethod
				def       _lowercase  (self       :   Any)					->			Optional[Any]:
					raise NotImplementedError()





