From e6d86b081980196745e5f0b0eda8ce5334c0ff67 Mon Sep 17 00:00:00 2001 From: Laurent Mazare Date: Sat, 13 Jan 2024 20:24:06 +0100 Subject: Add the pow operator. (#1583) * Add the pow operator. * Support the pow operation in onnx. --- candle-onnx/src/eval.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'candle-onnx') 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])?; -- cgit v1.2.3