


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


snake_case							: List[str]      =   logging.get_logger(__name__)

snake_case							: Union[str, Any]      =   {
    '''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  snake_case_     (lowerCamelCase_   ):
					UpperCAmelCase__      :					Dict         =    '''fnet'''
					def __init__(   self     :str    ,__snake_case     :List[str]=3_20_00    ,__snake_case     :Union[str, Any]=7_68    ,__snake_case     :List[Any]=12    ,__snake_case     :Tuple=30_72    ,__snake_case     :List[Any]="gelu_new"    ,__snake_case     :int=0.1    ,__snake_case     :int=5_12    ,__snake_case     :Dict=4    ,__snake_case     :Dict=0.02    ,__snake_case     :Tuple=1E-12    ,__snake_case     :List[str]=False    ,__snake_case     :Any=5_12    ,__snake_case     :List[Any]=3    ,__snake_case     :Dict=1    ,__snake_case     :Optional[int]=2    ,**__snake_case     :Optional[Any]    ,)      ->					List[Any]:
												super().__init__(pad_token_id=__snake_case    ,bos_token_id=__snake_case    ,eos_token_id=__snake_case    ,**__snake_case   )

												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








from typing import TYPE_CHECKING

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


snake_case							: Any      =   {
    '''configuration_mobilevit''': ['''MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MobileViTConfig''', '''MobileViTOnnxConfig'''],
}

try:
						if not is_vision_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							: Union[str, Any]      =   ['''MobileViTFeatureExtractor''']
						snake_case							: int      =   ['''MobileViTImageProcessor''']

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							: Dict      =   [
						    '''MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''MobileViTForImageClassification''',
						    '''MobileViTForSemanticSegmentation''',
						    '''MobileViTModel''',
						    '''MobileViTPreTrainedModel''',
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							: Tuple      =   [
						    '''TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''TFMobileViTForImageClassification''',
						    '''TFMobileViTForSemanticSegmentation''',
						    '''TFMobileViTModel''',
						    '''TFMobileViTPreTrainedModel''',
						]

if TYPE_CHECKING:
						from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

						try:
												if not is_vision_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .feature_extraction_mobilevit import MobileViTFeatureExtractor
												from .image_processing_mobilevit import MobileViTImageProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_mobilevit import (
												    MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    MobileViTForImageClassification,
												    MobileViTForSemanticSegmentation,
												    MobileViTModel,
												    MobileViTPreTrainedModel,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_mobilevit import (
												    TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFMobileViTForImageClassification,
												    TFMobileViTForSemanticSegmentation,
												    TFMobileViTModel,
												    TFMobileViTPreTrainedModel,
												)


else:
						import sys

						snake_case							: Optional[int]      =   _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




