pub fn init_weights(&mut self) {
        let mut rng = rand::thread_rng();
        let cols = self.weights.ncols();
        for row in self.weights.iter_rows_mut() {
            for col in &mut row[..cols] {
                *col = rng.gen_range(0.0, 1.0);
            }
        }
    }
/// Initialize weights. Called by the constructor automatically (may change!).
Initialize weights. Called by the constructor automatically (may change!).
Initialize weights . Called by the constructor automatically ( may change! ) .
pub fn init_weights(&mut self) {
        let mut rng = rand::thread_rng();
        let cols = self.weights.ncols();
        for row in self.weights.iter_rows_mut() {
            for col in &mut row[..cols] {
                *col = rng.gen_range(0.0, 1.0);
            }
        }
    }
pub fn init_weights ( & mut self ) { let mut rng = rand :: thread_rng ( ) ; let cols = self . weights . ncols ( ) ; for row in self . weights . iter_rows_mut ( ) { for col in & mut row [ .. cols ] { * col = rng . gen_range ( 0.0 , 1.0 ) ; } } }
Initialize weights.
Initialize weights .
&mut self
&mut self