

'''simple docstring'''

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


lowercase__         =      logging.get_logger(__name__)

lowercase__         =      {
    "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_			(    _snake_case							):






     '''simple docstring'''



     UpperCAmelCase_						:     Optional[Any]  		=  """fnet"""


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

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



'''simple docstring'''

from __future__ import annotations




def 				UpperCamelCase(					UpperCAmelCase_  ,	UpperCAmelCase_  ,	UpperCAmelCase_     ):
 if len(UpperCAmelCase_     ) == 0:
  raise ValueError('find_max() arg is an empty sequence'     )
 if (
     left >= len(UpperCAmelCase_     )
     or left < -len(UpperCAmelCase_     )
     or right >= len(UpperCAmelCase_     )
     or right < -len(UpperCAmelCase_     )
 ):
  raise IndexError('list index out of range'     )
 if left == right:
  return nums[left]
 UpperCAmelCase	:     Optional[int]						 =			(left + right) >> 1  # the middle
 UpperCAmelCase	:     Any						 =			find_max(UpperCAmelCase_  ,	UpperCAmelCase_  ,	UpperCAmelCase_     )  # find max in range[left, mid]
 UpperCAmelCase	:     Union[str, Any]						 =			find_max(UpperCAmelCase_  ,	mid + 1  ,	UpperCAmelCase_     )  # find max in range[mid + 1, right]

 return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
 import doctest

 doctest.testmod(verbose=True)




