

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


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

_a:      int								=     {
    """microsoft/mpnet-base""": """https://huggingface.co/microsoft/mpnet-base/resolve/main/config.json""",
}

class   __UpperCamelCase      (   snake_case__  ):
	SCREAMING_SNAKE_CASE__      			=       'mpnet'




	def __init__(						self		:  str						,		lowerCAmelCase		:  Optional[Any]=30_527						,		lowerCAmelCase		:  Any=768						,		lowerCAmelCase		:  List[Any]=12						,		lowerCAmelCase		:  str=12						,		lowerCAmelCase		:  int=3_072						,		lowerCAmelCase		:  List[Any]="gelu"						,		lowerCAmelCase		:  Union[str, Any]=0.1						,		lowerCAmelCase		:  List[str]=0.1						,		lowerCAmelCase		:  Union[str, Any]=512						,		lowerCAmelCase		:  Tuple=0.02						,		lowerCAmelCase		:  List[str]=1e-12						,		lowerCAmelCase		:  Tuple=32						,		lowerCAmelCase		:  str=1						,		lowerCAmelCase		:  List[Any]=0						,		lowerCAmelCase		:  str=2						,		**lowerCAmelCase		:  Dict						,		):


		'''simple docstring'''







		super().__init__(pad_token_id=lowerCAmelCase						,		bos_token_id=lowerCAmelCase						,		eos_token_id=lowerCAmelCase						,		**lowerCAmelCase							)

		UpperCAmelCase_    			=     vocab_size
		UpperCAmelCase_    			=     hidden_size
		UpperCAmelCase_    			=     num_hidden_layers
		UpperCAmelCase_    			=     num_attention_heads
		UpperCAmelCase_    			=     hidden_act
		UpperCAmelCase_    			=     intermediate_size
		UpperCAmelCase_    			=     hidden_dropout_prob
		UpperCAmelCase_    			=     attention_probs_dropout_prob
		UpperCAmelCase_    			=     max_position_embeddings
		UpperCAmelCase_    			=     initializer_range
		UpperCAmelCase_    			=     layer_norm_eps
		UpperCAmelCase_    			=     relative_attention_num_buckets


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_torch_available,
    is_vision_available,
)


_a:      Tuple								=     {
    """configuration_segformer""": ["""SEGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""", """SegformerConfig""", """SegformerOnnxConfig"""]
}

try:
				if not is_vision_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_a:      List[str]								=     ["""SegformerFeatureExtractor"""]
				_a:      Union[str, Any]								=     ["""SegformerImageProcessor"""]

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_a:      Any								=     [
				    """SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
				    """SegformerDecodeHead""",
				    """SegformerForImageClassification""",
				    """SegformerForSemanticSegmentation""",
				    """SegformerLayer""",
				    """SegformerModel""",
				    """SegformerPreTrainedModel""",
				]

try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_a:      Optional[Any]								=     [
				    """TF_SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
				    """TFSegformerDecodeHead""",
				    """TFSegformerForImageClassification""",
				    """TFSegformerForSemanticSegmentation""",
				    """TFSegformerModel""",
				    """TFSegformerPreTrainedModel""",
				]


if TYPE_CHECKING:
				from .configuration_segformer import SEGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, SegformerConfig, SegformerOnnxConfig

				try:
								if not is_vision_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .feature_extraction_segformer import SegformerFeatureExtractor
								from .image_processing_segformer import SegformerImageProcessor

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_segformer import (
								    SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
								    SegformerDecodeHead,
								    SegformerForImageClassification,
								    SegformerForSemanticSegmentation,
								    SegformerLayer,
								    SegformerModel,
								    SegformerPreTrainedModel,
								)
				try:
								if not is_tf_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_tf_segformer import (
								    TF_SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
								    TFSegformerDecodeHead,
								    TFSegformerForImageClassification,
								    TFSegformerForSemanticSegmentation,
								    TFSegformerModel,
								    TFSegformerPreTrainedModel,
								)

else:
				import sys

				_a:      Optional[int]								=     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)