



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


SCREAMING_SNAKE_CASE  					=    logging.get_logger(__name__)

SCREAMING_SNAKE_CASE  					=    {
    'facebook/deit-base-distilled-patch16-224': (
        'https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json'
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}



class 						lowerCamelCase   (    snake_case_	):







					'''simple docstring'''







					lowerCAmelCase_					:     Union[str, Any]					       =	'''deit'''



					def __init__(      self     ,						lowerCAmelCase=768     ,						lowerCAmelCase=12     ,						lowerCAmelCase=12     ,						lowerCAmelCase=3072     ,						lowerCAmelCase="gelu"     ,						lowerCAmelCase=0.0     ,						lowerCAmelCase=0.0     ,						lowerCAmelCase=0.02     ,						lowerCAmelCase=1e-1_2     ,						lowerCAmelCase=224     ,						lowerCAmelCase=16     ,						lowerCAmelCase=3     ,						lowerCAmelCase=True     ,						lowerCAmelCase=16     ,						**lowerCAmelCase     ,						):
							super().__init__(**__lowercase  )

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





class 						lowerCamelCase   (    snake_case_	):







					'''simple docstring'''







					lowerCAmelCase_					:     Optional[int]					       =	version.parse('1.11'	)



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



					@property
					def  A__		(      self  ):
							return 1e-4





'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase_			:  Optional[int]										=   logging.get_logger(__name__)

UpperCAmelCase_			:  List[str]										=   {
    '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     _lowerCamelCase       (     snake_case_					):




 '''simple docstring'''
 __lowercase					:		List[Any]     				=    '''fnet'''


 def __init__(   self   ,   __lowercase=32_000   ,   __lowercase=768   ,   __lowercase=12   ,   __lowercase=3_072   ,   __lowercase="gelu_new"   ,   __lowercase=0.1   ,   __lowercase=512   ,   __lowercase=4   ,   __lowercase=0.0_2   ,   __lowercase=1E-12   ,   __lowercase=False   ,   __lowercase=512   ,   __lowercase=3   ,   __lowercase=1   ,   __lowercase=2   ,   **__lowercase   ,   ):

  """simple docstring"""







  super().__init__(pad_token_id=__lowercase   ,   bos_token_id=__lowercase   ,   eos_token_id=__lowercase   ,   **__lowercase    )

  __A	:		Union[str, Any]	  =      vocab_size
  __A	:		Dict	  =      max_position_embeddings
  __A	:		List[str]	  =      hidden_size
  __A	:		Tuple	  =      num_hidden_layers
  __A	:		Optional[int]	  =      intermediate_size
  __A	:		Dict	  =      hidden_act
  __A	:		List[str]	  =      hidden_dropout_prob
  __A	:		str	  =      initializer_range
  __A	:		Dict	  =      type_vocab_size
  __A	:		int	  =      layer_norm_eps
  __A	:		Tuple	  =      use_tpu_fourier_optimizations
  __A	:		Optional[Any]	  =      tpu_short_seq_length






