



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


__SCREAMING_SNAKE_CASE  :						Dict    							=      logging.get_logger(__name__)

__SCREAMING_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 							lowerCamelCase_(   A__    ):





					'''simple docstring'''



					lowercase__   :       Any										= 'fnet'

					def __init__(    self				,       lowerCamelCase__=3_2_0_0_0				,       lowerCamelCase__=7_6_8				,       lowerCamelCase__=1_2				,       lowerCamelCase__=3_0_7_2				,       lowerCamelCase__="gelu_new"				,       lowerCamelCase__=0.1				,       lowerCamelCase__=5_1_2				,       lowerCamelCase__=4				,       lowerCamelCase__=0.0_2				,       lowerCamelCase__=1e-12				,       lowerCamelCase__=False				,       lowerCamelCase__=5_1_2				,       lowerCamelCase__=3				,       lowerCamelCase__=1				,       lowerCamelCase__=2				,       **lowerCamelCase__				,       ):
									super().__init__(pad_token_id=lowerCamelCase__				,       bos_token_id=lowerCamelCase__				,       eos_token_id=lowerCamelCase__				,       **lowerCamelCase__   )

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





"""simple docstring"""
import numpy as np



def        lowerCAmelCase_(   lowercase_     :							np.array							)	->       np.array:
				return 1 / (1 + np.exp(-vector							))



def        lowerCAmelCase_(   lowercase_     :							np.array							)	->       np.array:
				return vector * sigmoid(1.7_0_2 * vector							)


if __name__ == "__main__":
			import doctest

			doctest.testmod()
