'''simple docstring'''






from collections import OrderedDict
from typing import Mapping

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


_UpperCAmelCase    :     Optional[int]         =       logging.get_logger(__name__)

_UpperCAmelCase    :     int         =       {
    '''facebook/xlm-roberta-xl''': '''https://huggingface.co/facebook/xlm-roberta-xl/resolve/main/config.json''',
    '''facebook/xlm-roberta-xxl''': '''https://huggingface.co/facebook/xlm-roberta-xxl/resolve/main/config.json''',
    # See all XLM-RoBERTa-XL models at https://huggingface.co/models?filter=xlm-roberta-xl
}







class lowercase_       (		_UpperCamelCase			):







   """simple docstring"""

   __lowerCAmelCase         =   "xlm-roberta-xl"
   def __init__(      self      :			Any, UpperCamelCase__      :			str=25_08_80, UpperCamelCase__      :			Optional[Any]=25_60, UpperCamelCase__      :			Dict=36, UpperCamelCase__      :			Any=32, UpperCamelCase__      :			Any=1_02_40, UpperCamelCase__      :			Optional[Any]="gelu", UpperCamelCase__      :			Optional[Any]=0.1, UpperCamelCase__      :			int=0.1, UpperCamelCase__      :			List[str]=5_14, UpperCamelCase__      :			Union[str, Any]=1, UpperCamelCase__      :			List[Any]=0.02, UpperCamelCase__      :			Union[str, Any]=1e-05, UpperCamelCase__      :			Union[str, Any]=1, UpperCamelCase__      :			Optional[int]=0, UpperCamelCase__      :			List[str]=2, UpperCamelCase__      :			List[Any]="absolute", UpperCamelCase__      :			int=True, UpperCamelCase__      :			int=None, **UpperCamelCase__      :			List[Any], )  ->			str:
        super().__init__(pad_token_id=UpperCamelCase__, bos_token_id=UpperCamelCase__, eos_token_id=UpperCamelCase__, **UpperCamelCase__     )
        _A    		=  vocab_size
        _A    		=  hidden_size
        _A    		=  num_hidden_layers
        _A    		=  num_attention_heads
        _A    		=  hidden_act
        _A    		=  intermediate_size
        _A    		=  hidden_dropout_prob
        _A    		=  attention_probs_dropout_prob
        _A    		=  max_position_embeddings
        _A    		=  type_vocab_size
        _A    		=  initializer_range
        _A    		=  layer_norm_eps
        _A    		=  position_embedding_type
        _A    		=  use_cache
        _A    		=  classifier_dropout







class lowercase_       (		_UpperCamelCase			):







   """simple docstring"""

   @property
   def 	__UpperCAmelCase   (      self      :			Tuple     )  ->			Mapping[str, Mapping[int, str]]:
        if self.task == "multiple-choice":
             _A    		=  {0: 'batch', 1: 'choice', 2: 'sequence'}
        else:
             _A    		=  {0: 'batch', 1: 'sequence'}
        return OrderedDict(
            [
                ('input_ids', dynamic_axis),
                ('attention_mask', dynamic_axis),
            ]     )




'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_UpperCAmelCase    :     Any         =       {
    '''configuration_maskformer''': ['''MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MaskFormerConfig'''],
    '''configuration_maskformer_swin''': ['''MaskFormerSwinConfig'''],
}

try:
   if not is_vision_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase    :     str         =       ['''MaskFormerFeatureExtractor''']
   _UpperCAmelCase    :     str         =       ['''MaskFormerImageProcessor''']


try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase    :     Tuple         =       [
       '''MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''MaskFormerForInstanceSegmentation''',
       '''MaskFormerModel''',
       '''MaskFormerPreTrainedModel''',
   ]
   _UpperCAmelCase    :     int         =       [
       '''MaskFormerSwinBackbone''',
       '''MaskFormerSwinModel''',
       '''MaskFormerSwinPreTrainedModel''',
   ]

if TYPE_CHECKING:
   from .configuration_maskformer import MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, MaskFormerConfig
   from .configuration_maskformer_swin import MaskFormerSwinConfig

   try:
      if not is_vision_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .feature_extraction_maskformer import MaskFormerFeatureExtractor
      from .image_processing_maskformer import MaskFormerImageProcessor
   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_maskformer import (
          MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
          MaskFormerForInstanceSegmentation,
          MaskFormerModel,
          MaskFormerPreTrainedModel,
      )
      from .modeling_maskformer_swin import (
          MaskFormerSwinBackbone,
          MaskFormerSwinModel,
          MaskFormerSwinPreTrainedModel,
      )


else:
   import sys

   _UpperCAmelCase    :     str         =       _LazyModule(__name__, globals()['''__file__'''], _import_structure)



