






'''simple docstring'''







import warnings
from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_A			:    Union[str, Any]					  =logging.get_logger(__name__)

_A			:    Tuple					  ={
    '''nvidia/segformer-b0-finetuned-ade-512-512''': (
        '''https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512/resolve/main/config.json'''
    ),
    # See all SegFormer models at https://huggingface.co/models?filter=segformer
}

class _lowercase			(       _lowercase	):
							a          = """segformer"""




							def __init__(							self:       List[Any]    ,							UpperCamelCase__:       Union[str, Any]=3    ,							UpperCamelCase__:       Optional[int]=4    ,							UpperCamelCase__:       Optional[Any]=[2, 2, 2, 2]    ,							UpperCamelCase__:       Optional[int]=[8, 4, 2, 1]    ,							UpperCamelCase__:       int=[32, 64, 160, 256]    ,							UpperCamelCase__:       List[Any]=[7, 3, 3, 3]    ,							UpperCamelCase__:       List[str]=[4, 2, 2, 2]    ,							UpperCamelCase__:       Optional[int]=[1, 2, 5, 8]    ,							UpperCamelCase__:       List[str]=[4, 4, 4, 4]    ,							UpperCamelCase__:       Union[str, Any]="gelu"    ,							UpperCamelCase__:       Tuple=0.0    ,							UpperCamelCase__:       List[str]=0.0    ,							UpperCamelCase__:       int=0.1    ,							UpperCamelCase__:       Optional[Any]=0.02    ,							UpperCamelCase__:       List[Any]=0.1    ,							UpperCamelCase__:       Optional[Any]=1e-6    ,							UpperCamelCase__:       str=256    ,							UpperCamelCase__:       str=255    ,							**UpperCamelCase__:       int    ,							):
														super().__init__(**UpperCamelCase__  )

														if "reshape_last_stage" in kwargs and kwargs["reshape_last_stage"] is False:
																					warnings.warn(
																					    """Reshape_last_stage is set to False in this config. This argument is deprecated and will soon be"""
																					    """ removed, as the behaviour will default to that of reshape_last_stage = True."""    ,							UpperCamelCase__    ,							)

														lowerCamelCase__      :			Tuple 						= num_channels
														lowerCamelCase__      :			str 						= num_encoder_blocks
														lowerCamelCase__      :			List[str] 						= depths
														lowerCamelCase__      :			Optional[int] 						= sr_ratios
														lowerCamelCase__      :			List[str] 						= hidden_sizes
														lowerCamelCase__      :			Optional[Any] 						= patch_sizes
														lowerCamelCase__      :			Dict 						= strides
														lowerCamelCase__      :			Dict 						= mlp_ratios
														lowerCamelCase__      :			Dict 						= num_attention_heads
														lowerCamelCase__      :			Optional[int] 						= hidden_act
														lowerCamelCase__      :			str 						= hidden_dropout_prob
														lowerCamelCase__      :			Any 						= attention_probs_dropout_prob
														lowerCamelCase__      :			Tuple 						= classifier_dropout_prob
														lowerCamelCase__      :			Any 						= initializer_range
														lowerCamelCase__      :			Dict 						= drop_path_rate
														lowerCamelCase__      :			Any 						= layer_norm_eps
														lowerCamelCase__      :			Optional[Any] 						= decoder_hidden_size
														lowerCamelCase__      :			Optional[int] 						= kwargs.get("""reshape_last_stage"""    ,							UpperCamelCase__  )
														lowerCamelCase__      :			Any 						= semantic_loss_ignore_index



class _lowercase			(       _lowercase	):
							a          = version.parse("""1.11"""	)




							@property
							def 	lowerCamelCase_       (							self:       Tuple  ):
														return OrderedDict(
														    [
														        ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
														    ]  )




							@property
							def 	lowerCamelCase_       (							self:       Tuple  ):
														return 1e-4




							@property
							def 	lowerCamelCase_       (							self:       Union[str, Any]  ):
														return 12









'''simple docstring'''







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


_A			:    str					  =logging.get_logger(__name__)

_A			:    int					  ={
    '''weiweishi/roc-bert-base-zh''': '''https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json''',
}

class _lowercase			(       _lowercase	):
							a          = """roc_bert"""




							def __init__(							self:       Optional[Any]    ,							UpperCamelCase__:       Any=30_522    ,							UpperCamelCase__:       Optional[Any]=768    ,							UpperCamelCase__:       Union[str, Any]=12    ,							UpperCamelCase__:       Tuple=12    ,							UpperCamelCase__:       Tuple=3_072    ,							UpperCamelCase__:       str="gelu"    ,							UpperCamelCase__:       List[Any]=0.1    ,							UpperCamelCase__:       List[str]=0.1    ,							UpperCamelCase__:       Dict=512    ,							UpperCamelCase__:       str=2    ,							UpperCamelCase__:       str=0.02    ,							UpperCamelCase__:       Tuple=1e-12    ,							UpperCamelCase__:       Any=True    ,							UpperCamelCase__:       Union[str, Any]=0    ,							UpperCamelCase__:       List[Any]="absolute"    ,							UpperCamelCase__:       Any=None    ,							UpperCamelCase__:       Any=True    ,							UpperCamelCase__:       Optional[int]=True    ,							UpperCamelCase__:       Union[str, Any]=768    ,							UpperCamelCase__:       int=910    ,							UpperCamelCase__:       Tuple=512    ,							UpperCamelCase__:       int=24_858    ,							UpperCamelCase__:       Optional[Any]=True    ,							**UpperCamelCase__:       Optional[Any]    ,							):
														lowerCamelCase__      :			Optional[Any] 						= vocab_size
														lowerCamelCase__      :			Tuple 						= max_position_embeddings
														lowerCamelCase__      :			List[Any] 						= hidden_size
														lowerCamelCase__      :			int 						= num_hidden_layers
														lowerCamelCase__      :			Tuple 						= num_attention_heads
														lowerCamelCase__      :			Any 						= intermediate_size
														lowerCamelCase__      :			List[str] 						= hidden_act
														lowerCamelCase__      :			str 						= hidden_dropout_prob
														lowerCamelCase__      :			Dict 						= attention_probs_dropout_prob
														lowerCamelCase__      :			Union[str, Any] 						= initializer_range
														lowerCamelCase__      :			Tuple 						= type_vocab_size
														lowerCamelCase__      :			Optional[Any] 						= layer_norm_eps
														lowerCamelCase__      :			List[Any] 						= use_cache
														lowerCamelCase__      :			Tuple 						= enable_pronunciation
														lowerCamelCase__      :			Union[str, Any] 						= enable_shape
														lowerCamelCase__      :			Union[str, Any] 						= pronunciation_embed_dim
														lowerCamelCase__      :			Any 						= pronunciation_vocab_size
														lowerCamelCase__      :			int 						= shape_embed_dim
														lowerCamelCase__      :			Tuple 						= shape_vocab_size
														lowerCamelCase__      :			Optional[Any] 						= concat_input
														lowerCamelCase__      :			str 						= position_embedding_type
														lowerCamelCase__      :			Dict 						= classifier_dropout
														super().__init__(pad_token_id=UpperCamelCase__    ,							**UpperCamelCase__  )

