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


lowerCAmelCase__     						=			logging.get_logger(__name__)

lowerCAmelCase__     						=			{
    """google/canine-s""": """https://huggingface.co/google/canine-s/resolve/main/config.json""",
    # See all CANINE models at https://huggingface.co/models?filter=canine
}
class     a_			(						__snake_case						):






 '''simple docstring'''






 UpperCAmelCase_     			= 'canine'




 def __init__(      self :  Tuple      ,   lowercase__ :  List[Any]=768      ,   lowercase__ :  int=12      ,   lowercase__ :  List[str]=12      ,   lowercase__ :  Dict=3_072      ,   lowercase__ :  int="gelu"      ,   lowercase__ :  Optional[Any]=0.1      ,   lowercase__ :  List[Any]=0.1      ,   lowercase__ :  List[str]=16_384      ,   lowercase__ :  Optional[Any]=16      ,   lowercase__ :  List[str]=0.02      ,   lowercase__ :  Optional[Any]=1e-12      ,   lowercase__ :  List[str]=0      ,   lowercase__ :  Union[str, Any]=0xE000      ,   lowercase__ :  Optional[Any]=0xE001      ,   lowercase__ :  List[str]=4      ,   lowercase__ :  List[str]=4      ,   lowercase__ :  Union[str, Any]=8      ,   lowercase__ :  int=16_384      ,   lowercase__ :  int=128      ,   **lowercase__ :  List[str]      ,   ):







        '''simple docstring'''



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

        lowerCAmelCase__					     = max_position_embeddings
        lowerCAmelCase__					     = hidden_size
        lowerCAmelCase__					     = num_hidden_layers
        lowerCAmelCase__					     = num_attention_heads
        lowerCAmelCase__					     = intermediate_size
        lowerCAmelCase__					     = hidden_act
        lowerCAmelCase__					     = hidden_dropout_prob
        lowerCAmelCase__					     = attention_probs_dropout_prob
        lowerCAmelCase__					     = initializer_range
        lowerCAmelCase__					     = type_vocab_size
        lowerCAmelCase__					     = layer_norm_eps

        # Character config:
        lowerCAmelCase__					     = downsampling_rate
        lowerCAmelCase__					     = upsampling_kernel_size
        lowerCAmelCase__					     = num_hash_functions
        lowerCAmelCase__					     = num_hash_buckets
        lowerCAmelCase__					     = local_transformer_stride

import numpy as np






def 				__lowerCamelCase		(						lowerCAmelCase__     ):
       return 1 / (1 + np.exp(-vector     ))






def 				__lowerCamelCase		(						lowerCAmelCase__     ):
       return vector * sigmoid(lowerCAmelCase__     )


if __name__ == "__main__":
    import doctest

    doctest.testmod()
