



"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


__SCREAMING_SNAKE_CASE  :						str    							=      logging.get_logger(__name__)

__SCREAMING_SNAKE_CASE  :						Optional[int]    							=      {
    'microsoft/swinv2-tiny-patch4-window8-256': (
        'https://huggingface.co/microsoft/swinv2-tiny-patch4-window8-256/resolve/main/config.json'
    ),
}


class 							lowerCamelCase_(   UpperCamelCase_    ):





					'''simple docstring'''



					lowercase__   :       Optional[int]										= 'swinv2'

					lowercase__   :       Dict										= {
					    'num_attention_heads': 'num_heads',
					    'num_hidden_layers': 'num_layers',
					}

					def __init__(    self				,       lowerCamelCase__=2_2_4				,       lowerCamelCase__=4				,       lowerCamelCase__=3				,       lowerCamelCase__=9_6				,       lowerCamelCase__=[2, 2, 6, 2]				,       lowerCamelCase__=[3, 6, 1_2, 2_4]				,       lowerCamelCase__=7				,       lowerCamelCase__=4.0				,       lowerCamelCase__=True				,       lowerCamelCase__=0.0				,       lowerCamelCase__=0.0				,       lowerCamelCase__=0.1				,       lowerCamelCase__="gelu"				,       lowerCamelCase__=False				,       lowerCamelCase__=0.0_2				,       lowerCamelCase__=1e-5				,       lowerCamelCase__=3_2				,       **lowerCamelCase__				,       ):
									super().__init__(**UpperCamelCase__   )

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





"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


__SCREAMING_SNAKE_CASE  :						Optional[Any]    							=      {
    '''configuration_vision_encoder_decoder''': ['''VisionEncoderDecoderConfig''', '''VisionEncoderDecoderOnnxConfig''']
}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			__SCREAMING_SNAKE_CASE  :						str    							=      ['''VisionEncoderDecoderModel''']

try:
			if not is_tf_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			__SCREAMING_SNAKE_CASE  :						Dict    							=      ['''TFVisionEncoderDecoderModel''']

try:
			if not is_flax_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			__SCREAMING_SNAKE_CASE  :						List[Any]    							=      ['''FlaxVisionEncoderDecoderModel''']

if TYPE_CHECKING:
			from .configuration_vision_encoder_decoder import VisionEncoderDecoderConfig, VisionEncoderDecoderOnnxConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_vision_encoder_decoder import VisionEncoderDecoderModel

			try:
						if not is_tf_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_tf_vision_encoder_decoder import TFVisionEncoderDecoderModel

			try:
						if not is_flax_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_flax_vision_encoder_decoder import FlaxVisionEncoderDecoderModel

else:
			import sys

			__SCREAMING_SNAKE_CASE  :						Union[str, Any]    							=      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
