summaryrefslogtreecommitdiff
path: root/candle-onnx
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2024-01-13 20:24:06 +0100
committerGitHub <noreply@github.com>2024-01-13 20:24:06 +0100
commite6d86b081980196745e5f0b0eda8ce5334c0ff67 (patch)
treef2680645ff85136d8504bde6f75e2a61cbee22f6 /candle-onnx
parent88618255cb3c20b511a2f0e6db35d84081ce3c4a (diff)
downloadcandle-e6d86b081980196745e5f0b0eda8ce5334c0ff67.tar.gz
candle-e6d86b081980196745e5f0b0eda8ce5334c0ff67.tar.bz2
candle-e6d86b081980196745e5f0b0eda8ce5334c0ff67.zip
Add the pow operator. (#1583)
* Add the pow operator. * Support the pow operation in onnx.
Diffstat (limited to 'candle-onnx')
-rw-r--r--candle-onnx/src/eval.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/candle-onnx/src/eval.rs b/candle-onnx/src/eval.rs
index 684776c2..c0ad8668 100644
--- a/candle-onnx/src/eval.rs
+++ b/candle-onnx/src/eval.rs
@@ -254,6 +254,12 @@ pub fn simple_eval(
let output = input0.broadcast_div(input1)?;
values.insert(node.output[0].clone(), output);
}
+ "Pow" => {
+ let input0 = get(&node.input[0])?;
+ let input1 = get(&node.input[1])?;
+ let output = input0.broadcast_pow(input1)?;
+ values.insert(node.output[0].clone(), output);
+ }
"Equal" => {
let input0 = get(&node.input[0])?;
let input1 = get(&node.input[1])?;