Example #1
0
def Selu(x,
         alpha=1.6732632423543772848170429916717,
         lmbda=1.0507009873554804934193349852946):
    return lmbda * np.where(x > 0, x, alpha * np.expm1(x))
Example #2
0
def Elu(x, a=1., **unused_kwargs):
    return np.where(x > 0, x, a * np.expm1(x))