'''simple docstring'''




from .imports import is_rich_available


if is_rich_available():
   from rich.traceback import install

   install(show_locals=False)

else:
   raise ModuleNotFoundError("To use the rich extension, install rich with `pip install rich`")







'''simple docstring'''




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


_a   :	Any 							=   logging.get_logger(__name__)

_a   :	List[Any] 							=   {
    "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       (__magic_name__   ):
       snake_case       :Any				    =					"cvt"






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






