rotta_rs 0.0.6

a Deep Learning library with rust language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use rand::{ distr::Distribution };
use rand_distr::Normal;

use crate::rotta_rs_module::Module;

impl Module {
    pub fn glorot_initialization(&mut self, input: usize, output: usize) -> f64 {
        let glorot_formula = 2.0 / ((input + output) as f64);
        let glorot_std = glorot_formula.sqrt();

        let normal = Normal::new(0.0, glorot_std).unwrap();
        normal.sample(&mut self.rng)
    }
}