Skip to content

Commit

Permalink
bugfixing: tests should works fine now
Browse files Browse the repository at this point in the history
Signed-off-by: José Carlos García <hola@josecarlos.me>
  • Loading branch information
JoseCarlosGarcia95 committed Dec 9, 2024
1 parent 8367e6a commit 81067cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions candle-nn/src/bit_linear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
//! use candle_nn::{BitLinear, Module};
//! # fn main() -> candle::Result<()> {
//!
//! let w = Tensor::new(&[[1f32, 2.], [3., 4.], [5., 6.]], &Cpu)?;
//! let w = Tensor::new(&[[1f32, -1.], [-1., 1.], [1., 1.]], &Cpu)?;
//! let layer = BitLinear::new(w, None); // Use no bias.
//! let xs = Tensor::new(&[[10f32, 100.]], &Cpu)?;
//! let xs = Tensor::new(&[[1f32, -1.]], &Cpu)?;
//! let ys = layer.forward(&xs)?;
//! assert_eq!(ys.to_vec2::<f32>()?, &[[210.0, 430.0, 650.0]]);
//! assert_eq!(ys.to_vec2::<f32>()?, &[[2.0f32, -2.0, 0.0]]);
//! # Ok(()) }
//! ```
use candle::{Result, Tensor, D};
Expand Down

0 comments on commit 81067cb

Please sign in to comment.