


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


a_					:    str          =    logging.get_logger(__name__)

a_					:    Optional[int]          =    {
    "google/fnet-base": "https://huggingface.co/google/fnet-base/resolve/main/config.json",
    "google/fnet-large": "https://huggingface.co/google/fnet-large/resolve/main/config.json"
    # See all FNet models at https://huggingface.co/models?filter=fnet
}




class  a     (     _SCREAMING_SNAKE_CASE       ):
 _lowerCAmelCase 					=	"""fnet"""
 def __init__( self      ,				__magic_name__=3_20_00      ,				__magic_name__=7_68      ,				__magic_name__=12      ,				__magic_name__=30_72      ,				__magic_name__="gelu_new"      ,				__magic_name__=0.1      ,				__magic_name__=5_12      ,				__magic_name__=4      ,				__magic_name__=0.0_2      ,				__magic_name__=1e-12      ,				__magic_name__=False      ,				__magic_name__=5_12      ,				__magic_name__=3      ,				__magic_name__=1      ,				__magic_name__=2      ,				**__magic_name__      ,				)					->							Optional[int]:
      super().__init__(pad_token_id=__magic_name__      ,				bos_token_id=__magic_name__      ,				eos_token_id=__magic_name__      ,				**__magic_name__						)

      _a			      =							vocab_size
      _a			      =							max_position_embeddings
      _a			      =							hidden_size
      _a			      =							num_hidden_layers
      _a			      =							intermediate_size
      _a			      =							hidden_act
      _a			      =							hidden_dropout_prob
      _a			      =							initializer_range
      _a			      =							type_vocab_size
      _a			      =							layer_norm_eps
      _a			      =							use_tpu_fourier_optimizations
      _a			      =							tpu_short_seq_length





'''simple docstring'''






from typing import TYPE_CHECKING

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


a_					:    int          =    {"configuration_vit": ["VIT_PRETRAINED_CONFIG_ARCHIVE_MAP", "ViTConfig", "ViTOnnxConfig"]}

try:
 if not is_vision_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 a_					:    List[Any]          =    ["ViTFeatureExtractor"]
 a_					:    Optional[int]          =    ["ViTImageProcessor"]

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 a_					:    Optional[int]          =    [
     "VIT_PRETRAINED_MODEL_ARCHIVE_LIST",
     "ViTForImageClassification",
     "ViTForMaskedImageModeling",
     "ViTModel",
     "ViTPreTrainedModel",
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 a_					:    Any          =    [
     "TFViTForImageClassification",
     "TFViTModel",
     "TFViTPreTrainedModel",
 ]

try:
 if not is_flax_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 a_					:    Dict          =    [
     "FlaxViTForImageClassification",
     "FlaxViTModel",
     "FlaxViTPreTrainedModel",
 ]

if TYPE_CHECKING:
 from .configuration_vit import VIT_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTConfig, ViTOnnxConfig

 try:
  if not is_vision_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .feature_extraction_vit import ViTFeatureExtractor
  from .image_processing_vit import ViTImageProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_vit import (
      VIT_PRETRAINED_MODEL_ARCHIVE_LIST,
      ViTForImageClassification,
      ViTForMaskedImageModeling,
      ViTModel,
      ViTPreTrainedModel,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_vit import TFViTForImageClassification, TFViTModel, TFViTPreTrainedModel

 try:
  if not is_flax_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_flax_vit import FlaxViTForImageClassification, FlaxViTModel, FlaxViTPreTrainedModel


else:
 import sys

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

