


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


_SCREAMING_SNAKE_CASE      :			Optional[int]      				=   {
    "configuration_perceiver": ["PERCEIVER_PRETRAINED_CONFIG_ARCHIVE_MAP", "PerceiverConfig", "PerceiverOnnxConfig"],
    "tokenization_perceiver": ["PerceiverTokenizer"],
}

try:
 if not is_vision_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _SCREAMING_SNAKE_CASE      :			Optional[Any]      				=   ["PerceiverFeatureExtractor"]
 _SCREAMING_SNAKE_CASE      :			Union[str, Any]      				=   ["PerceiverImageProcessor"]

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _SCREAMING_SNAKE_CASE      :			List[str]      				=   [
     "PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST",
     "PerceiverForImageClassificationConvProcessing",
     "PerceiverForImageClassificationFourier",
     "PerceiverForImageClassificationLearned",
     "PerceiverForMaskedLM",
     "PerceiverForMultimodalAutoencoding",
     "PerceiverForOpticalFlow",
     "PerceiverForSequenceClassification",
     "PerceiverLayer",
     "PerceiverModel",
     "PerceiverPreTrainedModel",
 ]


if TYPE_CHECKING:
 from .configuration_perceiver import PERCEIVER_PRETRAINED_CONFIG_ARCHIVE_MAP, PerceiverConfig, PerceiverOnnxConfig
 from .tokenization_perceiver import PerceiverTokenizer

 try:
  if not is_vision_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .feature_extraction_perceiver import PerceiverFeatureExtractor
  from .image_processing_perceiver import PerceiverImageProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_perceiver import (
      PERCEIVER_PRETRAINED_MODEL_ARCHIVE_LIST,
      PerceiverForImageClassificationConvProcessing,
      PerceiverForImageClassificationFourier,
      PerceiverForImageClassificationLearned,
      PerceiverForMaskedLM,
      PerceiverForMultimodalAutoencoding,
      PerceiverForOpticalFlow,
      PerceiverForSequenceClassification,
      PerceiverLayer,
      PerceiverModel,
      PerceiverPreTrainedModel,
  )

else:
 import sys

 _SCREAMING_SNAKE_CASE      :			List[Any]      				=   _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)








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


_SCREAMING_SNAKE_CASE      :			Dict      				=   logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE      :			Optional[Any]      				=   {
    "alibaba-damo/mgp-str-base": "https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json",
}

class   A__ (   snake_case__     ):







    """simple docstring"""

    __magic_name__        =		'mgp-str'
    def __init__(	self      , __snake_case=[3_2, 1_2_8]      , __snake_case=4      , __snake_case=3      , __snake_case=2_7      , __snake_case=3_8      , __snake_case=5_0_2_5_7      , __snake_case=3_0_5_2_2      , __snake_case=7_6_8      , __snake_case=1_2      , __snake_case=1_2      , __snake_case=4.0      , __snake_case=True      , __snake_case=False      , __snake_case=1E-5      , __snake_case=0.0      , __snake_case=0.0      , __snake_case=0.0      , __snake_case=False      , __snake_case=0.02      , **__snake_case      , ):
         super().__init__(**__snake_case   )

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




