def symmetric_elliot_function( signal, derivative=False ):
    s = 1.0 # steepness
    
    abs_signal = (1 + np.abs(signal * s))
    if derivative:
        return s / abs_signal**2
    else:
        # Return the activation signal
        return (signal * s) / abs_signal
#end activation function
A fast approximation of tanh
dataset/ETHPy150Open jorgenkg/python-neural-network/src/activation_functions.py/symmetric_elliot_function