
from typing import TYPE_CHECKING

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


lowerCamelCase_  :	Tuple 				=					{"""configuration_swin""": ["""SWIN_PRETRAINED_CONFIG_ARCHIVE_MAP""", """SwinConfig""", """SwinOnnxConfig"""]}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCamelCase_  :	str 				=					[
		    """SWIN_PRETRAINED_MODEL_ARCHIVE_LIST""",
		    """SwinForImageClassification""",
		    """SwinForMaskedImageModeling""",
		    """SwinModel""",
		    """SwinPreTrainedModel""",
		    """SwinBackbone""",
		]

try:
		if not is_tf_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowerCamelCase_  :	str 				=					[
		    """TF_SWIN_PRETRAINED_MODEL_ARCHIVE_LIST""",
		    """TFSwinForImageClassification""",
		    """TFSwinForMaskedImageModeling""",
		    """TFSwinModel""",
		    """TFSwinPreTrainedModel""",
		]

if TYPE_CHECKING:
		from .configuration_swin import SWIN_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinConfig, SwinOnnxConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_swin import (
				    SWIN_PRETRAINED_MODEL_ARCHIVE_LIST,
				    SwinBackbone,
				    SwinForImageClassification,
				    SwinForMaskedImageModeling,
				    SwinModel,
				    SwinPreTrainedModel,
				)

		try:
				if not is_tf_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_tf_swin import (
				    TF_SWIN_PRETRAINED_MODEL_ARCHIVE_LIST,
				    TFSwinForImageClassification,
				    TFSwinForMaskedImageModeling,
				    TFSwinModel,
				    TFSwinPreTrainedModel,
				)

else:
		import sys

		lowerCamelCase_  :	Tuple 				=					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)








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


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

lowerCamelCase_  :	Optional[int] 				=					{"""ctrl""": """https://huggingface.co/ctrl/resolve/main/config.json"""}

class     _UpperCamelCase			(   _A					):






			'''simple docstring'''

			__UpperCamelCase :  int    =	"""ctrl"""
			__UpperCamelCase :  Dict    =	["""past_key_values"""]
			__UpperCamelCase :  List[str]    =	{
			    """max_position_embeddings""": """n_positions""",
			    """hidden_size""": """n_embd""",
			    """num_attention_heads""": """n_head""",
			    """num_hidden_layers""": """n_layer""",
			}

			def __init__(    self	:    Dict  ,		snake_case_	:    Any=24_6534  ,		snake_case_	:    Dict=256  ,		snake_case_	:    str=1280  ,		snake_case_	:    Optional[int]=8192  ,		snake_case_	:    Union[str, Any]=48  ,		snake_case_	:    Any=16  ,		snake_case_	:    Optional[int]=0.1  ,		snake_case_	:    Any=0.1  ,		snake_case_	:    Any=1e-6  ,		snake_case_	:    Optional[Any]=0.02  ,		snake_case_	:    Optional[int]=True  ,		**snake_case_	:    Union[str, Any]  ,		):
							UpperCamelCase_:							Union[str, Any]		=  vocab_size
							UpperCamelCase_:							Union[str, Any]		=  n_positions
							UpperCamelCase_:							Optional[int]		=  n_embd
							UpperCamelCase_:							int		=  n_layer
							UpperCamelCase_:							str		=  n_head
							UpperCamelCase_:							Optional[int]		=  dff
							UpperCamelCase_:							Optional[Any]		=  resid_pdrop
							UpperCamelCase_:							Union[str, Any]		=  embd_pdrop
							UpperCamelCase_:							List[str]		=  layer_norm_epsilon
							UpperCamelCase_:							Optional[Any]		=  initializer_range

							UpperCamelCase_:							Optional[Any]		=  use_cache

							super().__init__(**snake_case_ )






