'''simple docstring'''





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


SCREAMING_SNAKE_CASE_:					List[Any]  =logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_:					List[str]  ={
    'microsoft/cvt-13': 'https://huggingface.co/microsoft/cvt-13/resolve/main/config.json',
    # See all Cvt models at https://huggingface.co/models?filter=cvt
}




class 	__A				(			UpperCamelCase__     ):
    a__	:						Any	       =  """cvt"""



    def __init__(self   :   List[Any]       ,      __a   :   Tuple=3       ,      __a   :   Any=[7, 3, 3]       ,      __a   :   List[str]=[4, 2, 2]       ,      __a   :   Optional[Any]=[2, 1, 1]       ,      __a   :   str=[64, 192, 384]       ,      __a   :   str=[1, 3, 6]       ,      __a   :   Any=[1, 2, 10]       ,      __a   :   Dict=[4.0, 4.0, 4.0]       ,      __a   :   Dict=[0.0, 0.0, 0.0]       ,      __a   :   Tuple=[0.0, 0.0, 0.0]       ,      __a   :   Union[str, Any]=[0.0, 0.0, 0.1]       ,      __a   :   Any=[True, True, True]       ,      __a   :   Optional[int]=[False, False, True]       ,      __a   :   Optional[int]=["dw_bn", "dw_bn", "dw_bn"]       ,      __a   :   Optional[Any]=[3, 3, 3]       ,      __a   :   str=[1, 1, 1]       ,      __a   :   Tuple=[2, 2, 2]       ,      __a   :   List[str]=[1, 1, 1]       ,      __a   :   List[str]=[1, 1, 1]       ,      __a   :   Optional[int]=0.02       ,      __a   :   List[Any]=1E-12       ,      **__a   :   List[Any]       ,      ):
         super().__init__(**__a			)
         UpperCAmelCase_	   =       num_channels
         UpperCAmelCase_	   =       patch_sizes
         UpperCAmelCase_	   =       patch_stride
         UpperCAmelCase_	   =       patch_padding
         UpperCAmelCase_	   =       embed_dim
         UpperCAmelCase_	   =       num_heads
         UpperCAmelCase_	   =       depth
         UpperCAmelCase_	   =       mlp_ratio
         UpperCAmelCase_	   =       attention_drop_rate
         UpperCAmelCase_	   =       drop_rate
         UpperCAmelCase_	   =       drop_path_rate
         UpperCAmelCase_	   =       qkv_bias
         UpperCAmelCase_	   =       cls_token
         UpperCAmelCase_	   =       qkv_projection_method
         UpperCAmelCase_	   =       kernel_qkv
         UpperCAmelCase_	   =       padding_kv
         UpperCAmelCase_	   =       stride_kv
         UpperCAmelCase_	   =       padding_q
         UpperCAmelCase_	   =       stride_q
         UpperCAmelCase_	   =       initializer_range
         UpperCAmelCase_	   =       layer_norm_eps





'''simple docstring'''





from typing import TYPE_CHECKING

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


SCREAMING_SNAKE_CASE_:					int  ={
    'configuration_maskformer': ['MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MaskFormerConfig'],
    'configuration_maskformer_swin': ['MaskFormerSwinConfig'],
}

try:
    if not is_vision_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    SCREAMING_SNAKE_CASE_:					List[str]  =['MaskFormerFeatureExtractor']
    SCREAMING_SNAKE_CASE_:					Union[str, Any]  =['MaskFormerImageProcessor']


try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    SCREAMING_SNAKE_CASE_:					Dict  =[
        'MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
        'MaskFormerForInstanceSegmentation',
        'MaskFormerModel',
        'MaskFormerPreTrainedModel',
    ]
    SCREAMING_SNAKE_CASE_:					List[str]  =[
        '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

    SCREAMING_SNAKE_CASE_:					Dict  =_LazyModule(__name__, globals()['__file__'], _import_structure)




