




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


__magic_name__  :  Optional[Any]					=       logging.get_logger(__name__)

__magic_name__  :  int					=       {
    """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     SCREAMING_SNAKE_CASE__		(_a			):
     lowercase_ :      str				= "segformer"
     def __init__(						self	:		Optional[int]       ,						__lowerCamelCase	:		Optional[Any]=3       ,						__lowerCamelCase	:		Dict=4       ,						__lowerCamelCase	:		str=[2, 2, 2, 2]       ,						__lowerCamelCase	:		str=[8, 4, 2, 1]       ,						__lowerCamelCase	:		Union[str, Any]=[32, 64, 1_60, 2_56]       ,						__lowerCamelCase	:		str=[7, 3, 3, 3]       ,						__lowerCamelCase	:		Optional[Any]=[4, 2, 2, 2]       ,						__lowerCamelCase	:		List[Any]=[1, 2, 5, 8]       ,						__lowerCamelCase	:		Optional[Any]=[4, 4, 4, 4]       ,						__lowerCamelCase	:		str="gelu"       ,						__lowerCamelCase	:		Optional[int]=0.0       ,						__lowerCamelCase	:		int=0.0       ,						__lowerCamelCase	:		Any=0.1       ,						__lowerCamelCase	:		Dict=0.02       ,						__lowerCamelCase	:		Tuple=0.1       ,						__lowerCamelCase	:		Union[str, Any]=1e-6       ,						__lowerCamelCase	:		str=2_56       ,						__lowerCamelCase	:		str=2_55       ,						**__lowerCamelCase	:		Optional[int]       ,						):



       """simple docstring"""
       super().__init__(**__lowerCamelCase						)

       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.'''       ,						__lowerCamelCase       ,						)

       lowerCAmelCase__										=      num_channels
       lowerCAmelCase__										=      num_encoder_blocks
       lowerCAmelCase__										=      depths
       lowerCAmelCase__										=      sr_ratios
       lowerCAmelCase__										=      hidden_sizes
       lowerCAmelCase__										=      patch_sizes
       lowerCAmelCase__										=      strides
       lowerCAmelCase__										=      mlp_ratios
       lowerCAmelCase__										=      num_attention_heads
       lowerCAmelCase__										=      hidden_act
       lowerCAmelCase__										=      hidden_dropout_prob
       lowerCAmelCase__										=      attention_probs_dropout_prob
       lowerCAmelCase__										=      classifier_dropout_prob
       lowerCAmelCase__										=      initializer_range
       lowerCAmelCase__										=      drop_path_rate
       lowerCAmelCase__										=      layer_norm_eps
       lowerCAmelCase__										=      decoder_hidden_size
       lowerCAmelCase__										=      kwargs.get('''reshape_last_stage'''       ,						__lowerCamelCase						)
       lowerCAmelCase__										=      semantic_loss_ignore_index





class     SCREAMING_SNAKE_CASE__		(_a			):
     lowercase_ :      List[Any]				= version.parse("1.11"			)
     @property
     def        A__      (						self	:		Union[str, Any]						):



       """simple docstring"""
       return OrderedDict(
           [
               ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
           ]						)
     @property
     def        A__      (						self	:		int						):



       """simple docstring"""
       return 1e-4



     @property
     def        A__      (						self	:		Optional[int]						):



       """simple docstring"""
       return 12







from typing import TYPE_CHECKING

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


__magic_name__  :  Union[str, Any]					=       {
    """configuration_altclip""": [
        """ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """AltCLIPConfig""",
        """AltCLIPTextConfig""",
        """AltCLIPVisionConfig""",
    ],
    """processing_altclip""": ["""AltCLIPProcessor"""],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __magic_name__  :  str					=       [
          """ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """AltCLIPPreTrainedModel""",
          """AltCLIPModel""",
          """AltCLIPTextModel""",
          """AltCLIPVisionModel""",
      ]


if TYPE_CHECKING:
      from .configuration_altclip import (
          ALTCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
          AltCLIPConfig,
          AltCLIPTextConfig,
          AltCLIPVisionConfig,
      )
      from .processing_altclip import AltCLIPProcessor

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_altclip import (
                ALTCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
                AltCLIPModel,
                AltCLIPPreTrainedModel,
                AltCLIPTextModel,
                AltCLIPVisionModel,
            )


else:
      import sys

      __magic_name__  :  str					=       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)

