
import copy

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


SCREAMING_SNAKE_CASE				:int									=							logging.get_logger(__name__)





class 				UpperCAmelCase (    __SCREAMING_SNAKE_CASE    ):




	'''simple docstring'''





	snake_case_          =	"upernet"






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

					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(A				,A					):
									__A       =					backbone_config.get("model_type"					)
									__A       =					CONFIG_MAPPING[backbone_model_type]
									__A       =					config_class.from_dict(A					)

					__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 							UpperCamelCase_    (			self   :					Union[str, Any]					):
					__A       =					copy.deepcopy(self.__dict__					)
					__A       =					self.backbone_config.to_dict()
					__A       =					self.__class__.model_type
					return output

"""simple docstring"""



import warnings

from ...utils import logging
from .image_processing_donut import DonutImageProcessor


SCREAMING_SNAKE_CASE__:Dict									=			logging.get_logger(__name__)






class  snake_case__      (       snake_case_       ):


 def __init__( self    ,		*lowerCamelCase    ,		**lowerCamelCase						):
        warnings.warn(
            "The class DonutFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"
            " use DonutImageProcessor instead."    ,		lowerCamelCase    ,		)
        super().__init__(*lowerCamelCase    ,		**lowerCamelCase						)
