summaryrefslogtreecommitdiff
path: root/candle-examples/examples/custom-ops/main.rs
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2023-08-17 11:12:05 +0100
committerGitHub <noreply@github.com>2023-08-17 11:12:05 +0100
commit03be33eea482accbcf4c547728c2db7e24b7ebb0 (patch)
treeda5680d6d705d9346edbac9f2ce4a05779b86343 /candle-examples/examples/custom-ops/main.rs
parentd32e8199cd6c8381aa309528675d6d6a88c0f850 (diff)
downloadcandle-03be33eea482accbcf4c547728c2db7e24b7ebb0.tar.gz
candle-03be33eea482accbcf4c547728c2db7e24b7ebb0.tar.bz2
candle-03be33eea482accbcf4c547728c2db7e24b7ebb0.zip
Relax the requirements on CustomOp. (#486)
* Relax the requirements on CustomOp. * Simplify the custom-ops when no backward is required.
Diffstat (limited to 'candle-examples/examples/custom-ops/main.rs')
-rw-r--r--candle-examples/examples/custom-ops/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-examples/examples/custom-ops/main.rs b/candle-examples/examples/custom-ops/main.rs
index 63bcd83a..7f7a3f26 100644
--- a/candle-examples/examples/custom-ops/main.rs
+++ b/candle-examples/examples/custom-ops/main.rs
@@ -89,7 +89,7 @@ fn main() -> anyhow::Result<()> {
let device = candle_examples::device(args.cpu)?;
let t = Tensor::arange(0f32, 14f32, &device)?.reshape((2, 7))?;
println!("{t}");
- let t = t.custom_op1(LayerNorm { eps: 1e-5 })?;
+ let t = t.apply_op1(LayerNorm { eps: 1e-5 })?;
println!("{t}");
Ok(())
}