vlrelu
Description
Computes Leaky ReLU on the input tensor element-wise. If an element is greater than or equal to 0, the element is retained; otherwise, the element is multiplied by the alpha constant.
Prototype
vlrelu(raw_tensor, alpha=0)
Parameters
Applicability
Returns
res_tensor: a tvm.tensor for the result tensor
Restrictions
None
Example
from tbe import tvm from tbe import dsl shape = (1024,1024) input_dtype = "float16" data = tvm.placeholder(shape, name="data", dtype=input_dtype) res = dsl.vlrelu(data, alpha=0.01)
Parent topic: NN Compute APIs