






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


snake_case    				=		{
    """configuration_jukebox""": [
        """JUKEBOX_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """JukeboxConfig""",
        """JukeboxPriorConfig""",
        """JukeboxVQVAEConfig""",
    ],
    """tokenization_jukebox""": ["""JukeboxTokenizer"""],
}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   snake_case    				=		[
       """JUKEBOX_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """JukeboxModel""",
       """JukeboxPreTrainedModel""",
       """JukeboxVQVAE""",
       """JukeboxPrior""",
   ]

if TYPE_CHECKING:
   from .configuration_jukebox import (
       JUKEBOX_PRETRAINED_CONFIG_ARCHIVE_MAP,
       JukeboxConfig,
       JukeboxPriorConfig,
       JukeboxVQVAEConfig,
   )
   from .tokenization_jukebox import JukeboxTokenizer

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_jukebox import (
          JUKEBOX_PRETRAINED_MODEL_ARCHIVE_LIST,
          JukeboxModel,
          JukeboxPreTrainedModel,
          JukeboxPrior,
          JukeboxVQVAE,
      )

else:
   import sys

   snake_case    				=		_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)














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


snake_case    				=		logging.get_logger(__name__)

snake_case    				=		{
    """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			(			lowerCAmelCase					):
     '''simple docstring'''


     UpperCamelCase_							:		str			=	'''segformer'''


     def __init__(				self       :	List[Any]					, UpperCAmelCase_       :	int=3					, UpperCAmelCase_       :	Optional[Any]=4					, UpperCAmelCase_       :	List[str]=[2, 2, 2, 2]					, UpperCAmelCase_       :	Optional[int]=[8, 4, 2, 1]					, UpperCAmelCase_       :	Union[str, Any]=[32, 64, 160, 256]					, UpperCAmelCase_       :	int=[7, 3, 3, 3]					, UpperCAmelCase_       :	str=[4, 2, 2, 2]					, UpperCAmelCase_       :	List[str]=[1, 2, 5, 8]					, UpperCAmelCase_       :	List[Any]=[4, 4, 4, 4]					, UpperCAmelCase_       :	Dict="gelu"					, UpperCAmelCase_       :	Optional[Any]=0.0					, UpperCAmelCase_       :	Optional[Any]=0.0					, UpperCAmelCase_       :	int=0.1					, UpperCAmelCase_       :	List[Any]=0.02					, UpperCAmelCase_       :	Optional[int]=0.1					, UpperCAmelCase_       :	Optional[Any]=1E-6					, UpperCAmelCase_       :	List[str]=256					, UpperCAmelCase_       :	Dict=255					, **UpperCAmelCase_       :	Dict					, ):
       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_					, )

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





class  SCREAMING_SNAKE_CASE			(			lowerCAmelCase					):
     '''simple docstring'''


     UpperCamelCase_							:		Dict			=	version.parse('''1.11'''					)


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


     @property
     def 				_A       (				self       :	List[str]      ):
       return 1E-4






     @property
     def 				_A       (				self       :	Any      ):
       return 12






