Skip to main content

xavier_normal

Function xavier_normal 

Source
pub fn xavier_normal(
    shape: &[usize],
    fan_in: usize,
    fan_out: usize,
    seed: Option<u64>,
) -> Tensor
Expand description

Xavier normal initialization (Glorot & Bengio, 2010).

Samples from N(0, std) where std = sqrt(2 / (fan_in + fan_out)). Suitable for tanh and sigmoid activations.