



'''simple docstring'''

from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


UpperCAmelCase      						=       logging.get_logger(__name__)

UpperCAmelCase      						=       {
    'microsoft/beit-base-patch16-224-pt22k': (
        'https://huggingface.co/microsoft/beit-base-patch16-224-pt22k/resolve/main/config.json'
    ),
    # See all BEiT models at https://huggingface.co/models?filter=beit
}

class __snake_case( __A   ):


						'''simple docstring'''



						UpperCAmelCase				:       Dict 	=						"beit"


						def __init__(   self      ,			A_=8192      ,			A_=768      ,			A_=12      ,			A_=12      ,			A_=3072      ,			A_="gelu"      ,			A_=0.0      ,			A_=0.0      ,			A_=0.0_2      ,			A_=1e-12      ,			A_=224      ,			A_=16      ,			A_=3      ,			A_=False      ,			A_=False      ,			A_=False      ,			A_=False      ,			A_=0.1      ,			A_=0.1      ,			A_=True      ,			A_=[3, 5, 7, 11]      ,			A_=[1, 2, 3, 6]      ,			A_=True      ,			A_=0.4      ,			A_=256      ,			A_=1      ,			A_=False      ,			A_=255      ,			**A_      ,			)      ->      Optional[Any]:
							super().__init__(**A_ )

							lowerCAmelCase       =      vocab_size
							lowerCAmelCase       =      hidden_size
							lowerCAmelCase       =      num_hidden_layers
							lowerCAmelCase       =      num_attention_heads
							lowerCAmelCase       =      intermediate_size
							lowerCAmelCase       =      hidden_act
							lowerCAmelCase       =      hidden_dropout_prob
							lowerCAmelCase       =      attention_probs_dropout_prob
							lowerCAmelCase       =      initializer_range
							lowerCAmelCase       =      layer_norm_eps

							lowerCAmelCase       =      image_size
							lowerCAmelCase       =      patch_size
							lowerCAmelCase       =      num_channels
							lowerCAmelCase       =      use_mask_token
							lowerCAmelCase       =      use_absolute_position_embeddings
							lowerCAmelCase       =      use_relative_position_bias
							lowerCAmelCase       =      use_shared_relative_position_bias
							lowerCAmelCase       =      layer_scale_init_value
							lowerCAmelCase       =      drop_path_rate
							lowerCAmelCase       =      use_mean_pooling
							# decode head attributes (semantic segmentation)
							lowerCAmelCase       =      out_indices
							lowerCAmelCase       =      pool_scales
							# auxiliary head attributes (semantic segmentation)
							lowerCAmelCase       =      use_auxiliary_head
							lowerCAmelCase       =      auxiliary_loss_weight
							lowerCAmelCase       =      auxiliary_channels
							lowerCAmelCase       =      auxiliary_num_convs
							lowerCAmelCase       =      auxiliary_concat_input
							lowerCAmelCase       =      semantic_loss_ignore_index







class __snake_case( __A   ):


						'''simple docstring'''



						UpperCAmelCase				:       Tuple 	=						version.parse("1.11"   )


						@property
						def 							__snake_case       (   self )      ->      Mapping[str, Mapping[int, str]]:
							return OrderedDict(
							    [
							        ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
							    ] )




						@property
						def 							__snake_case       (   self )      ->      float:
							return 1e-4


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a_      =     {
    'configuration_swinv2': ['SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP', 'Swinv2Config'],
}


try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			a_      =     [
			    'SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST',
			    'Swinv2ForImageClassification',
			    'Swinv2ForMaskedImageModeling',
			    'Swinv2Model',
			    'Swinv2PreTrainedModel',
			]


if TYPE_CHECKING:
			from .configuration_swinva import SWINV2_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinvaConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_swinva import (
						    SWINV2_PRETRAINED_MODEL_ARCHIVE_LIST,
						    SwinvaForImageClassification,
						    SwinvaForMaskedImageModeling,
						    SwinvaModel,
						    SwinvaPreTrainedModel,
						)


else:
			import sys

			a_      =     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)