




"""simple docstring"""

import copy

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


a							      =     logging.get_logger(__name__)





class 							lowercase_			(	__lowerCAmelCase				):



 '''simple docstring'''
 UpperCAmelCase       :	Optional[Any]     =      '''upernet'''

 def __init__(					self			:			str       ,				_UpperCAmelCase			:			List[Any]=None       ,				_UpperCAmelCase			:			Optional[Any]=512       ,				_UpperCAmelCase			:			List[str]=0.02       ,				_UpperCAmelCase			:			Union[str, Any]=[1, 2, 3, 6]       ,				_UpperCAmelCase			:			int=True       ,				_UpperCAmelCase			:			Union[str, Any]=0.4       ,				_UpperCAmelCase			:			Any=384       ,				_UpperCAmelCase			:			Dict=256       ,				_UpperCAmelCase			:			Tuple=1       ,				_UpperCAmelCase			:			str=False       ,				_UpperCAmelCase			:			Optional[Any]=255       ,				**_UpperCAmelCase			:			Dict       ,				):
       super().__init__(**_UpperCAmelCase						)

       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=['stage1', 'stage2', 'stage3', 'stage4']						)
       elif isinstance(_UpperCAmelCase       ,				_UpperCAmelCase						):
             _A     =  backbone_config.get('model_type'						)
             _A     =  CONFIG_MAPPING[backbone_model_type]
             _A     =  config_class.from_dict(_UpperCAmelCase						)

       _A     =  backbone_config
       _A     =  hidden_size
       _A     =  initializer_range
       _A     =  pool_scales
       _A     =  use_auxiliary_head
       _A     =  auxiliary_loss_weight
       _A     =  auxiliary_in_channels
       _A     =  auxiliary_channels
       _A     =  auxiliary_num_convs
       _A     =  auxiliary_concat_input
       _A     =  loss_ignore_index



 def      lowerCAmelCase_				(					self			:			Optional[Any]						):
       _A     =  copy.deepcopy(self.__dict__						)
       _A     =  self.backbone_config.to_dict()
       _A     =  self.__class__.model_type
       return output







"""simple docstring"""

from .configuration_bert_masked import MaskedBertConfig
from .modeling_bert_masked import (
    MaskedBertForMultipleChoice,
    MaskedBertForQuestionAnswering,
    MaskedBertForSequenceClassification,
    MaskedBertForTokenClassification,
    MaskedBertModel,
)
from .modules import *

