




'''simple docstring'''


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


_snake_case : Tuple  				=						logging.get_logger(__name__)

_snake_case : Tuple  				=						{
    """microsoft/swinv2-tiny-patch4-window8-256""": (
        """https://huggingface.co/microsoft/swinv2-tiny-patch4-window8-256/resolve/main/config.json"""
    ),
}

class      A       (						__lowercase       ):
							lowercase_							     =							'''swinv2'''

							lowercase_							     =							{
							    '''num_attention_heads''': '''num_heads''',
							    '''num_hidden_layers''': '''num_layers''',
							}







							def __init__(    self			:    int				,     lowerCAmelCase_			:    Dict=2_24				,     lowerCAmelCase_			:    Union[str, Any]=4				,     lowerCAmelCase_			:    List[str]=3				,     lowerCAmelCase_			:    Any=96				,     lowerCAmelCase_			:    Optional[int]=[2, 2, 6, 2]				,     lowerCAmelCase_			:    Optional[Any]=[3, 6, 12, 24]				,     lowerCAmelCase_			:    Tuple=7				,     lowerCAmelCase_			:    Any=4.0				,     lowerCAmelCase_			:    Optional[int]=True				,     lowerCAmelCase_			:    str=0.0				,     lowerCAmelCase_			:    str=0.0				,     lowerCAmelCase_			:    Any=0.1				,     lowerCAmelCase_			:    Optional[int]="gelu"				,     lowerCAmelCase_			:    int=False				,     lowerCAmelCase_			:    Tuple=0.0_2				,     lowerCAmelCase_			:    List[str]=1e-5				,     lowerCAmelCase_			:    Union[str, Any]=32				,     **lowerCAmelCase_			:    List[Any]				,     )     ->				List[Any]:


														"""simple docstring"""


														super().__init__(**_lowerCAmelCase   )

														_a      	=							image_size
														_a      	=							patch_size
														_a      	=							num_channels
														_a      	=							embed_dim
														_a      	=							depths
														_a      	=							len(_lowerCAmelCase   )
														_a      	=							num_heads
														_a      	=							window_size
														_a      	=							mlp_ratio
														_a      	=							qkv_bias
														_a      	=							hidden_dropout_prob
														_a      	=							attention_probs_dropout_prob
														_a      	=							drop_path_rate
														_a      	=							hidden_act
														_a      	=							use_absolute_embeddings
														_a      	=							layer_norm_eps
														_a      	=							initializer_range
														_a      	=							encoder_stride
														# we set the hidden_size attribute in order to make Swinv2 work with VisionEncoderDecoderModel
														# this indicates the channel dimension after the last stage of the model
														_a      	=							int(embed_dim * 2 ** (len(_lowerCAmelCase   ) - 1)   )
														_a      	=							(0, 0, 0, 0)








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCAmelCase							:       str					 =	{
    """configuration_pegasus_x""": ["""PEGASUS_X_PRETRAINED_CONFIG_ARCHIVE_MAP""", """PegasusXConfig"""],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowerCAmelCase							:       Optional[Any]					 =	[
							    """PEGASUS_X_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """PegasusXForConditionalGeneration""",
							    """PegasusXModel""",
							    """PegasusXPreTrainedModel""",
							]


if TYPE_CHECKING:
							from .configuration_pegasus_x import PEGASUS_X_PRETRAINED_CONFIG_ARCHIVE_MAP, PegasusXConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_pegasus_x import (
														    PEGASUS_X_PRETRAINED_MODEL_ARCHIVE_LIST,
														    PegasusXForConditionalGeneration,
														    PegasusXModel,
														    PegasusXPreTrainedModel,
														)


else:
							import sys

							lowerCAmelCase							:       str					 =	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



