



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


lowercase_								=     logging.get_logger(__name__)

lowercase_								=     {
    """naver-clova-ix/donut-base""": """https://huggingface.co/naver-clova-ix/donut-base/resolve/main/config.json""",
    # See all Donut models at https://huggingface.co/models?filter=donut-swin
}
class 				_snake_case			(					lowercase__):
				UpperCamelCase__				:					List[Any]     		="""donut-swin"""

				UpperCamelCase__				:					Any     		={
				    """num_attention_heads""": """num_heads""",
				    """num_hidden_layers""": """num_layers""",
				}




				def __init__(						self					:						Any,					__lowercase					:						Dict=224,					__lowercase					:						str=4,					__lowercase					:						Optional[int]=3,					__lowercase					:						Dict=96,					__lowercase					:						List[str]=[2, 2, 6, 2],					__lowercase					:						Union[str, Any]=[3, 6, 12, 24],					__lowercase					:						str=7,					__lowercase					:						Optional[Any]=4.0,					__lowercase					:						Tuple=True,					__lowercase					:						List[str]=0.0,					__lowercase					:						int=0.0,					__lowercase					:						Optional[Any]=0.1,					__lowercase					:						str="gelu",					__lowercase					:						List[str]=False,					__lowercase					:						Optional[Any]=0.02,					__lowercase					:						Optional[int]=1e-5,					**__lowercase					:						int,					):
							super().__init__(**__lowercase						)

							lowercase__					  =				image_size
							lowercase__					  =				patch_size
							lowercase__					  =				num_channels
							lowercase__					  =				embed_dim
							lowercase__					  =				depths
							lowercase__					  =				len(__lowercase						)
							lowercase__					  =				num_heads
							lowercase__					  =				window_size
							lowercase__					  =				mlp_ratio
							lowercase__					  =				qkv_bias
							lowercase__					  =				hidden_dropout_prob
							lowercase__					  =				attention_probs_dropout_prob
							lowercase__					  =				drop_path_rate
							lowercase__					  =				hidden_act
							lowercase__					  =				use_absolute_embeddings
							lowercase__					  =				layer_norm_eps
							lowercase__					  =				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
							lowercase__					  =				int(embed_dim * 2 ** (len(__lowercase						) - 1)						)









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase_								=     {
    """configuration_timesformer""": ["""TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""", """TimesformerConfig"""],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowercase_								=     [
							    """TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """TimesformerModel""",
							    """TimesformerForVideoClassification""",
							    """TimesformerPreTrainedModel""",
							]

if TYPE_CHECKING:
							from .configuration_timesformer import TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, TimesformerConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_timesformer import (
														    TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TimesformerForVideoClassification,
														    TimesformerModel,
														    TimesformerPreTrainedModel,
														)

else:
							import sys

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




