





'''simple docstring'''




from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


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


class  SCREAMING_SNAKE_CASE    (a__					,		a__							):
     lowerCAmelCase					=       '''maskformer-swin'''

     lowerCAmelCase					=       {
         '''num_attention_heads''': '''num_heads''',
         '''num_hidden_layers''': '''num_layers''',
     }


     def __init__(						self						,	_UpperCAmelCase=224						,	_UpperCAmelCase=4						,	_UpperCAmelCase=3						,	_UpperCAmelCase=96						,	_UpperCAmelCase=[2, 2, 6, 2]						,	_UpperCAmelCase=[3, 6, 12, 24]						,	_UpperCAmelCase=7						,	_UpperCAmelCase=4.0						,	_UpperCAmelCase=True						,	_UpperCAmelCase=0.0						,	_UpperCAmelCase=0.0						,	_UpperCAmelCase=0.1						,	_UpperCAmelCase="gelu"						,	_UpperCAmelCase=False						,	_UpperCAmelCase=0.02						,	_UpperCAmelCase=1e-5						,	_UpperCAmelCase=None						,	_UpperCAmelCase=None						,	**_UpperCAmelCase						,	):

          '''simple docstring'''






          super().__init__(**_UpperCAmelCase)

          __A						: Any      =       image_size
          __A						: List[Any]      =       patch_size
          __A						: Tuple      =       num_channels
          __A						: Union[str, Any]      =       embed_dim
          __A						: Dict      =       depths
          __A						: Tuple      =       len(_UpperCAmelCase)
          __A						: Optional[Any]      =       num_heads
          __A						: Any      =       window_size
          __A						: str      =       mlp_ratio
          __A						: Dict      =       qkv_bias
          __A						: Optional[int]      =       hidden_dropout_prob
          __A						: Dict      =       attention_probs_dropout_prob
          __A						: List[str]      =       drop_path_rate
          __A						: Any      =       hidden_act
          __A						: Optional[Any]      =       use_absolute_embeddings
          __A						: Union[str, Any]      =       layer_norm_eps
          __A						: Optional[int]      =       initializer_range
          # we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
          # this indicates the channel dimension after the last stage of the model
          __A						: Dict      =       int(embed_dim * 2 ** (len(_UpperCAmelCase) - 1))
          __A						: Any      =       ['stem'] + [F'stage{idx}' for idx in range(1						,	len(_UpperCAmelCase) + 1)]
          __A ,__A						: Optional[int]      =       get_aligned_output_features_output_indices(
              out_features=_UpperCAmelCase						,	out_indices=_UpperCAmelCase						,	stage_names=self.stage_names)






'''simple docstring'''




lowercase__    :      Dict						=    {
    '''Pillow''': '''Pillow''',
    '''accelerate''': '''accelerate>=0.11.0''',
    '''compel''': '''compel==0.1.8''',
    '''black''': '''black~=23.1''',
    '''datasets''': '''datasets''',
    '''filelock''': '''filelock''',
    '''flax''': '''flax>=0.4.1''',
    '''hf-doc-builder''': '''hf-doc-builder>=0.3.0''',
    '''huggingface-hub''': '''huggingface-hub>=0.13.2''',
    '''requests-mock''': '''requests-mock==1.10.0''',
    '''importlib_metadata''': '''importlib_metadata''',
    '''invisible-watermark''': '''invisible-watermark''',
    '''isort''': '''isort>=5.5.4''',
    '''jax''': '''jax>=0.2.8,!=0.3.2''',
    '''jaxlib''': '''jaxlib>=0.1.65''',
    '''Jinja2''': '''Jinja2''',
    '''k-diffusion''': '''k-diffusion>=0.0.12''',
    '''torchsde''': '''torchsde''',
    '''note_seq''': '''note_seq''',
    '''librosa''': '''librosa''',
    '''numpy''': '''numpy''',
    '''omegaconf''': '''omegaconf''',
    '''parameterized''': '''parameterized''',
    '''protobuf''': '''protobuf>=3.20.3,<4''',
    '''pytest''': '''pytest''',
    '''pytest-timeout''': '''pytest-timeout''',
    '''pytest-xdist''': '''pytest-xdist''',
    '''ruff''': '''ruff>=0.0.241''',
    '''safetensors''': '''safetensors''',
    '''sentencepiece''': '''sentencepiece>=0.1.91,!=0.1.92''',
    '''scipy''': '''scipy''',
    '''onnx''': '''onnx''',
    '''regex''': '''regex!=2019.12.17''',
    '''requests''': '''requests''',
    '''tensorboard''': '''tensorboard''',
    '''torch''': '''torch>=1.4''',
    '''torchvision''': '''torchvision''',
    '''transformers''': '''transformers>=4.25.1''',
    '''urllib3''': '''urllib3<=2.0.0''',
}