


'''simple docstring'''



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


_lowercase    :    Optional[Any]			     =  logging.get_logger(__name__)

_lowercase    :    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  UpperCamelCase__(     lowerCAmelCase ):
				__magic_name__       :   Tuple							= "cvt"




				def __init__(	self    :				Optional[Any]   ,					lowerCAmelCase    :				Optional[Any]=3   ,					lowerCAmelCase    :				int=[7, 3, 3]   ,					lowerCAmelCase    :				Optional[Any]=[4, 2, 2]   ,					lowerCAmelCase    :				int=[2, 1, 1]   ,					lowerCAmelCase    :				str=[64, 192, 384]   ,					lowerCAmelCase    :				Union[str, Any]=[1, 3, 6]   ,					lowerCAmelCase    :				Dict=[1, 2, 10]   ,					lowerCAmelCase    :				List[str]=[4.0, 4.0, 4.0]   ,					lowerCAmelCase    :				int=[0.0, 0.0, 0.0]   ,					lowerCAmelCase    :				Optional[Any]=[0.0, 0.0, 0.0]   ,					lowerCAmelCase    :				Any=[0.0, 0.0, 0.1]   ,					lowerCAmelCase    :				int=[True, True, True]   ,					lowerCAmelCase    :				Any=[False, False, True]   ,					lowerCAmelCase    :				Union[str, Any]=["dw_bn", "dw_bn", "dw_bn"]   ,					lowerCAmelCase    :				int=[3, 3, 3]   ,					lowerCAmelCase    :				List[Any]=[1, 1, 1]   ,					lowerCAmelCase    :				List[Any]=[2, 2, 2]   ,					lowerCAmelCase    :				Any=[1, 1, 1]   ,					lowerCAmelCase    :				List[str]=[1, 1, 1]   ,					lowerCAmelCase    :				Optional[int]=0.02   ,					lowerCAmelCase    :				Optional[int]=1E-12   ,					**lowerCAmelCase    :				str   ,					)->  Optional[int]:

										"""simple docstring"""




										super().__init__(**lowerCAmelCase   )
										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'''



# Copyright 2022 The HuggingFace Team and The OpenBMB Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_lowercase    :    Any			     =  {
    """configuration_cpmant""": ["""CPMANT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """CpmAntConfig"""],
    """tokenization_cpmant""": ["""CpmAntTokenizer"""],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowercase    :    int			     =  [
	    """CPMANT_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """CpmAntForCausalLM""",
	    """CpmAntModel""",
	    """CpmAntPreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_cpmant import CPMANT_PRETRAINED_CONFIG_ARCHIVE_MAP, CpmAntConfig
	from .tokenization_cpmant import CpmAntTokenizer

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_cpmant import (
		    CPMANT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    CpmAntForCausalLM,
		    CpmAntModel,
		    CpmAntPreTrainedModel,
		)


else:
	import sys

	_lowercase    :    Dict			     =  _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





