summaryrefslogtreecommitdiff
path: root/examples/basics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/basics.rs')
-rw-r--r--examples/basics.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/basics.rs b/examples/basics.rs
index f01f7871..d5d4f72b 100644
--- a/examples/basics.rs
+++ b/examples/basics.rs
@@ -2,7 +2,7 @@ use anyhow::Result;
use candle::{Device, Tensor};
fn main() -> Result<()> {
- let x = Tensor::var(&[3f32, 1., 4.], Device::Cpu)?;
+ let x = Tensor::var(&[3f32, 1., 4.], &Device::Cpu)?;
let y = (((&x * &x)? + &x * 5f64)? + 4f64)?;
println!("{:?}", y.to_vec1::<f32>()?);
Ok(())