



"""simple docstring"""







def   lowerCAmelCase__			(     lowerCamelCase__			) ->							float:
							if not nums:  # Makes sure that the list is not empty
														raise ValueError('List is empty'			)

							A         =					sum(lowerCamelCase__			) / len(lowerCamelCase__			)  # Calculate the average
							return sum(abs(x - average			) for x in nums			) / len(lowerCamelCase__			)


if __name__ == "__main__":
							import doctest

							doctest.testmod()








"""simple docstring"""







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


A    =			logging.get_logger(__name__)

A    =			{
    '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      UpperCAmelCase__		(      UpperCamelCase     ):
		lowerCAmelCase_       :	List[Any] 							=     """fnet"""



		def __init__( self  :    Tuple      ,							snake_case  :    Optional[int]=32_000      ,							snake_case  :    Optional[Any]=768      ,							snake_case  :    Union[str, Any]=12      ,							snake_case  :    List[str]=3_072      ,							snake_case  :    str="gelu_new"      ,							snake_case  :    Any=0.1      ,							snake_case  :    List[str]=512      ,							snake_case  :    Any=4      ,							snake_case  :    str=0.02      ,							snake_case  :    Union[str, Any]=1E-1_2      ,							snake_case  :    Optional[Any]=False      ,							snake_case  :    List[Any]=512      ,							snake_case  :    int=3      ,							snake_case  :    Any=1      ,							snake_case  :    Union[str, Any]=2      ,							**snake_case  :    Union[str, Any]      ,							)			->						Dict:






									'''simple docstring'''

									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



