diff options
author | Ionut Mihalcea <ionut.mihalcea@gmail.com> | 2024-11-26 23:10:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 23:10:09 +0100 |
commit | 21c686387cead049aad32e6d1cc494d6c79e46e3 (patch) | |
tree | b055d64d2bb5ac994f4bb26c67f19d3c258a5035 /candle-onnx/src/eval.rs | |
parent | b4deb5c5a9fc6287f7521e6bc2b7f3c2d56510dd (diff) | |
download | candle-21c686387cead049aad32e6d1cc494d6c79e46e3.tar.gz candle-21c686387cead049aad32e6d1cc494d6c79e46e3.tar.bz2 candle-21c686387cead049aad32e6d1cc494d6c79e46e3.zip |
Onnx Support for Sign operation #2641 (#2642)
* Support for Sign operation #2641
* Apply rustfmt.
---------
Co-authored-by: Laurent <laurent.mazare@gmail.com>
Diffstat (limited to 'candle-onnx/src/eval.rs')
-rw-r--r-- | candle-onnx/src/eval.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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:?}"), } } |