def leakyrelu(x, leak=0.01):
    '\n        leakyrelu激活函数\n    Args:\n        x (Tensor): input\n        leak (int): x<0时的斜率\n\n    Returns:\n        Tensor\n    '
    f1 = (0.5 * (1 + leak))
    f2 = (0.5 * (1 - leak))
    return ((f1 * x) + (f2 * tf.abs(x)))
leakyrelu激活函数
Args:
    x (Tensor): input
    leak (int): x<0时的斜率

Returns:
    Tensor
def leakyrelu(x, leak=0.01):
    '\n        leakyrelu激活函数\n    Args:\n        x (Tensor): input\n        leak (int): x<0时的斜率\n\n    Returns:\n        Tensor\n    '
    f1 = (0.5 * (1 + leak))
    f2 = (0.5 * (1 - leak))
    return ((f1 * x) + (f2 * tf.abs(x)))