From 21c686387cead049aad32e6d1cc494d6c79e46e3 Mon Sep 17 00:00:00 2001 From: Ionut Mihalcea Date: Tue, 26 Nov 2024 23:10:09 +0100 Subject: Onnx Support for Sign operation #2641 (#2642) * Support for Sign operation #2641 * Apply rustfmt. --------- Co-authored-by: Laurent --- candle-onnx/src/eval.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'candle-onnx/src/eval.rs') diff --git a/candle-onnx/src/eval.rs b/candle-onnx/src/eval.rs index 358af7ac..2c60ed2f 100644 --- a/candle-onnx/src/eval.rs +++ b/candle-onnx/src/eval.rs @@ -1944,6 +1944,12 @@ fn simple_eval_( values.insert(node.output[0].clone(), out); } + // https://onnx.ai/onnx/operators/onnx__Sign.html + "Sign" => { + let input = get(&node.input[0])?; + let output = input.sign()?; + values.insert(node.output[0].clone(), output); + } op_type => bail!("unsupported op_type {op_type} for op {node:?}"), } } -- cgit v1.2.3