






"""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							       =    {
    """google/vit-base-patch16-224""": """https://huggingface.co/vit-base-patch16-224/resolve/main/config.json""",
    # See all ViT models at https://huggingface.co/models?filter=vit
}




class    lowercase_    (__lowerCamelCase     ):
						A__	:		Tuple       			=				'''vit'''






						def __init__(    self     ,     a_=7_6_8     ,     a_=1_2     ,     a_=1_2     ,     a_=3_0_7_2     ,     a_="gelu"     ,     a_=0.0     ,     a_=0.0     ,     a_=0.02     ,     a_=1E-12     ,     a_=2_2_4     ,     a_=1_6     ,     a_=3     ,     a_=True     ,     a_=1_6     ,     **a_     ,     )	->Union[str, Any]:







								'''simple docstring'''


								super().__init__(**SCREAMING_SNAKE_CASE_	)

								_a							=	hidden_size
								_a							=	num_hidden_layers
								_a							=	num_attention_heads
								_a							=	intermediate_size
								_a							=	hidden_act
								_a							=	hidden_dropout_prob
								_a							=	attention_probs_dropout_prob
								_a							=	initializer_range
								_a							=	layer_norm_eps
								_a							=	image_size
								_a							=	patch_size
								_a							=	num_channels
								_a							=	qkv_bias
								_a							=	encoder_stride







class    lowercase_    (__lowerCamelCase     ):
						A__	:		Union[str, Any]       			=				version.parse('''1.11'''     )






						@property
						def 			lowerCamelCase__    (    self	)	->Optional[int]:







								'''simple docstring'''


								return OrderedDict(
								    [
								        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
								    ]	)






						@property
						def 			lowerCamelCase__    (    self	)	->str:







								'''simple docstring'''


								return 1E-4










"""simple docstring"""




from typing import TYPE_CHECKING

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


UpperCamelCase							       =    {"""configuration_fnet""": ["""FNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """FNetConfig"""]}

try:
     if not is_sentencepiece_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase							       =    ["""FNetTokenizer"""]

try:
     if not is_tokenizers_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase							       =    ["""FNetTokenizerFast"""]

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     UpperCamelCase							       =    [
         """FNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
         """FNetForMaskedLM""",
         """FNetForMultipleChoice""",
         """FNetForNextSentencePrediction""",
         """FNetForPreTraining""",
         """FNetForQuestionAnswering""",
         """FNetForSequenceClassification""",
         """FNetForTokenClassification""",
         """FNetLayer""",
         """FNetModel""",
         """FNetPreTrainedModel""",
     ]


if TYPE_CHECKING:
     from .configuration_fnet import FNET_PRETRAINED_CONFIG_ARCHIVE_MAP, FNetConfig

     try:
          if not is_sentencepiece_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_fnet import FNetTokenizer

     try:
          if not is_tokenizers_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_fnet_fast import FNetTokenizerFast

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_fnet import (
              FNET_PRETRAINED_MODEL_ARCHIVE_LIST,
              FNetForMaskedLM,
              FNetForMultipleChoice,
              FNetForNextSentencePrediction,
              FNetForPreTraining,
              FNetForQuestionAnswering,
              FNetForSequenceClassification,
              FNetForTokenClassification,
              FNetLayer,
              FNetModel,
              FNetPreTrainedModel,
          )


else:
     import sys

     UpperCamelCase							       =    _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


