Exemple #1
0
def unary_op(op_str, a):
    if op_str == "Abs":
        return ov.abs(a)
    elif op_str == "Acos":
        return ov.acos(a)
    elif op_str == "Acosh":
        return ov.acosh(a)
    elif op_str == "Asin":
        return ov.asin(a)
    elif op_str == "Asinh":
        return ov.asinh(a)
    elif op_str == "Atan":
        return ov.atan(a)
    elif op_str == "Atanh":
        return ov.atanh(a)
    elif op_str == "Ceiling":
        return ov.ceiling(a)
    elif op_str == "Cos":
        return ov.cos(a)
    elif op_str == "Cosh":
        return ov.cosh(a)
    elif op_str == "Floor":
        return ov.floor(a)
    elif op_str == "log":
        return ov.log(a)
    elif op_str == "exp":
        return ov.exp(a)
    elif op_str == "negative":
        return ov.negative(a)
    elif op_str == "Sign":
        return ov.sign(a)
    elif op_str == "Sin":
        return ov.sin(a)
    elif op_str == "Sinh":
        return ov.sinh(a)
    elif op_str == "Sqrt":
        return ov.sqrt(a)
    elif op_str == "Tan":
        return ov.tan(a)
    elif op_str == "Tanh":
        return ov.tanh(a)
Exemple #2
0
 def custom_preprocess(output: Output):
     return ops.abs(output)