





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


_snake_case    :       List[Any]		       =    logging.get_logger(__name__)

_snake_case    :       int		       =    {
    '''alibaba-damo/mgp-str-base''': '''https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json''',
}



class 							_UpperCAmelCase       (       _UpperCamelCase       ):

  """simple docstring"""


  a_              =					"""mgp-str"""






  def __init__(							self					:						int   ,    lowerCAmelCase_					:						List[Any]=[3_2, 1_2_8]   ,    lowerCAmelCase_					:						str=4   ,    lowerCAmelCase_					:						List[str]=3   ,    lowerCAmelCase_					:						Tuple=2_7   ,    lowerCAmelCase_					:						Optional[Any]=3_8   ,    lowerCAmelCase_					:						Optional[Any]=5_0_2_5_7   ,    lowerCAmelCase_					:						Dict=3_0_5_2_2   ,    lowerCAmelCase_					:						Dict=7_6_8   ,    lowerCAmelCase_					:						Tuple=1_2   ,    lowerCAmelCase_					:						int=1_2   ,    lowerCAmelCase_					:						int=4.0   ,    lowerCAmelCase_					:						Tuple=True   ,    lowerCAmelCase_					:						List[Any]=False   ,    lowerCAmelCase_					:						int=1e-5   ,    lowerCAmelCase_					:						int=0.0   ,    lowerCAmelCase_					:						Optional[Any]=0.0   ,    lowerCAmelCase_					:						List[Any]=0.0   ,    lowerCAmelCase_					:						Union[str, Any]=False   ,    lowerCAmelCase_					:						str=0.02   ,    **lowerCAmelCase_					:						Optional[int]   ,    )				->		List[Any]:
     super().__init__(**lowercase__	)

     __lowerCAmelCase				      =      image_size
     __lowerCAmelCase				      =      patch_size
     __lowerCAmelCase				      =      num_channels
     __lowerCAmelCase				      =      max_token_length
     __lowerCAmelCase				      =      num_character_labels
     __lowerCAmelCase				      =      num_bpe_labels
     __lowerCAmelCase				      =      num_wordpiece_labels
     __lowerCAmelCase				      =      hidden_size
     __lowerCAmelCase				      =      num_hidden_layers
     __lowerCAmelCase				      =      num_attention_heads
     __lowerCAmelCase				      =      mlp_ratio
     __lowerCAmelCase				      =      distilled
     __lowerCAmelCase				      =      layer_norm_eps
     __lowerCAmelCase				      =      drop_rate
     __lowerCAmelCase				      =      qkv_bias
     __lowerCAmelCase				      =      attn_drop_rate
     __lowerCAmelCase				      =      drop_path_rate
     __lowerCAmelCase				      =      output_aa_attentions
     __lowerCAmelCase				      =      initializer_range


from typing import TYPE_CHECKING

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


_lowercase:	Any       			=		{'''configuration_swin''': ['''SWIN_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''SwinConfig''', '''SwinOnnxConfig''']}


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

try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_lowercase:	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

				_lowercase:	Tuple       			=		_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)






