kaiming_normal

Function kaiming_normal 

Source
pub fn kaiming_normal<B>(
    shape: impl Into<Shape>,
    a: f64,
    mode: FanMode,
    dtype: DType,
    device: &<B as Backend>::Device,
) -> Result<Tensor<B>, Error>
where B: Backend,
Expand description

Kaiming (He) normal initialization.

Draws from N(0, std) where std = sqrt(gain² / fan).

§Arguments

  • a: negative slope of the rectifier (0 for ReLU)
  • mode: FanIn or FanOut