






'''simple docstring'''




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


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

__lowerCamelCase :       Union[str, Any] 				=       {
    '''facebook/deit-base-distilled-patch16-224''': (
        '''https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json'''
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}







class  A_						(A_				):
							"""simple docstring"""




							a__ 		=						"deit"

							def __init__(		self      :Dict							,				lowerCAmelCase__      :Optional[Any]=768							,				lowerCAmelCase__      :List[Any]=12							,				lowerCAmelCase__      :Optional[int]=12							,				lowerCAmelCase__      :List[Any]=3_072							,				lowerCAmelCase__      :Optional[int]="gelu"							,				lowerCAmelCase__      :List[Any]=0.0							,				lowerCAmelCase__      :Union[str, Any]=0.0							,				lowerCAmelCase__      :str=0.0_2							,				lowerCAmelCase__      :List[Any]=1E-1_2							,				lowerCAmelCase__      :Tuple=224							,				lowerCAmelCase__      :Any=16							,				lowerCAmelCase__      :Dict=3							,				lowerCAmelCase__      :int=True							,				lowerCAmelCase__      :Union[str, Any]=16							,				**lowerCAmelCase__      :Optional[int]							,				)					->	str:


										'''simple docstring'''




										super().__init__(**snake_case__					)

										snake_case_					:       int =							hidden_size
										snake_case_					:       str =							num_hidden_layers
										snake_case_					:       Optional[int] =							num_attention_heads
										snake_case_					:       List[Any] =							intermediate_size
										snake_case_					:       int =							hidden_act
										snake_case_					:       Union[str, Any] =							hidden_dropout_prob
										snake_case_					:       Dict =							attention_probs_dropout_prob
										snake_case_					:       Optional[Any] =							initializer_range
										snake_case_					:       Tuple =							layer_norm_eps
										snake_case_					:       str =							image_size
										snake_case_					:       Optional[Any] =							patch_size
										snake_case_					:       Union[str, Any] =							num_channels
										snake_case_					:       Tuple =							qkv_bias
										snake_case_					:       Optional[Any] =							encoder_stride







class  A_						(A_				):
							"""simple docstring"""




							a__ 		=						version.parse('''1.11'''				)

							@property
							def 				_A						(		self      :int					)					->	Mapping[str, Mapping[int, str]]:


										'''simple docstring'''




										return OrderedDict(
										    [
										        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
										    ]					)






							@property
							def 				_A						(		self      :Tuple					)					->	float:


										'''simple docstring'''




										return 1E-4






from typing import TYPE_CHECKING

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


__lowerCamelCase				=			{
    """configuration_chinese_clip""": [
        """CHINESE_CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """ChineseCLIPConfig""",
        """ChineseCLIPOnnxConfig""",
        """ChineseCLIPTextConfig""",
        """ChineseCLIPVisionConfig""",
    ],
    """processing_chinese_clip""": ["""ChineseCLIPProcessor"""],
}

try:
   if not is_vision_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __lowerCamelCase				=			["""ChineseCLIPFeatureExtractor"""]
   __lowerCamelCase				=			["""ChineseCLIPImageProcessor"""]

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __lowerCamelCase				=			[
       """CHINESE_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """ChineseCLIPModel""",
       """ChineseCLIPPreTrainedModel""",
       """ChineseCLIPTextModel""",
       """ChineseCLIPVisionModel""",
   ]

if TYPE_CHECKING:
   from .configuration_chinese_clip import (
       CHINESE_CLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
       ChineseCLIPConfig,
       ChineseCLIPOnnxConfig,
       ChineseCLIPTextConfig,
       ChineseCLIPVisionConfig,
   )
   from .processing_chinese_clip import ChineseCLIPProcessor

   try:
      if not is_vision_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .feature_extraction_chinese_clip import ChineseCLIPFeatureExtractor, ChineseCLIPImageProcessor

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_chinese_clip import (
          CHINESE_CLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
          ChineseCLIPModel,
          ChineseCLIPPreTrainedModel,
          ChineseCLIPTextModel,
          ChineseCLIPVisionModel,
      )

else:
   import sys

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





