vlrelu指令抽象。
若x大于等于0,则z=x;若x小于0,则z=x*y,x按元素与标量y相乘。
class Vlrelu(x, y, z)
参数名 |
输入/输出 |
数据类型 |
说明 |
---|---|---|---|
x |
输入 |
tensor变量 |
输入x向量tensor。支持float16、float32。 |
y |
输入 |
tensor变量 |
输入y标量。支持float16、float32。 |
z |
输出 |
tensor变量 |
输出向量tensor。支持float16、float32。 |
ub_x, ub_z = Tensor("UB"), Tensor("UB") scalar_y = 5 //5为y标量的值 ub_x.load(gm_x) out = vlrelu (ub_x, scalar_y, ub_z)()