diff options
author | laurent <laurent.mazare@gmail.com> | 2023-06-21 14:29:48 +0100 |
---|---|---|
committer | laurent <laurent.mazare@gmail.com> | 2023-06-21 14:29:48 +0100 |
commit | 7adffafedab0db2e842b50b5f9fd734cc704544e (patch) | |
tree | 01821311411998ba8ccda5cfbb2b1606d9340114 /tests/tensor_tests.rs | |
parent | 68f525f3219640750fcc4d3b84686bbfc0a0b8fa (diff) | |
download | candle-7adffafedab0db2e842b50b5f9fd734cc704544e.tar.gz candle-7adffafedab0db2e842b50b5f9fd734cc704544e.tar.bz2 candle-7adffafedab0db2e842b50b5f9fd734cc704544e.zip |
Abstract the gradient storage.
Diffstat (limited to 'tests/tensor_tests.rs')
-rw-r--r-- | tests/tensor_tests.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/tensor_tests.rs b/tests/tensor_tests.rs index 01f6f66c..fb2d84d9 100644 --- a/tests/tensor_tests.rs +++ b/tests/tensor_tests.rs @@ -2,7 +2,7 @@ use candle::{DType, Device, Result, Tensor}; #[test] fn zeros() -> Result<()> { - let tensor = Tensor::zeros((5, 2), DType::F32, Device::Cpu); + let tensor = Tensor::zeros((5, 2), DType::F32, Device::Cpu)?; let (dim1, dim2) = tensor.shape().r2()?; assert_eq!(dim1, 5); assert_eq!(dim2, 2); |