/// Generate network biases (used during initialization) by sampling from the
/// given distribution.
Generate network biases (used during initialization) by sampling from the
given distribution.
Generate network biases ( used during initialization ) by sampling from the given distribution .
fn init_biases<D>(layer_sizes: &Vec<u32>, distribution: &D) -> Vec<LayerBiases>
    where
        D: Distribution<f64>,
    {
        let mut biases = Vec::with_capacity(layer_sizes.len() - 1);
        for layer in layer_sizes.iter().skip(1) {
            biases.push(Array::random((*layer as usize, 1), distribution));
        }
        biases
    }
fn init_biases < D > ( layer_sizes : & Vec < u32 > , distribution : & D ) -> Vec < LayerBiases > where D : Distribution < f64 > , { let mut biases = Vec :: with_capacity ( layer_sizes . len ( ) - 1 ) ; for layer in layer_sizes . iter ( ) . skip ( 1 ) { biases . push ( Array :: random ( ( * layer as usize , 1 ) , distribution ) ) ; } biases }
Generate network biases (used during initialization) by sampling from the
given distribution.
Generate network biases ( used during initialization ) by sampling from the given distribution .
layer_sizes
&Vec<u32>
distribution
&D