hasktorch-0.2.0.0: Functional differentiable programming in Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Torch.Initializers

Synopsis

Documentation

data FanMode Source #

Constructors

FanIn 
FanOut 

newtype Shape Source #

Constructors

Shape [Int] 

calculateGain :: NonLinearity -> Float Source #

Gain scaling value for He initialization

calculateFan :: [Int] -> (Int, Int) Source #

Fan-in / Fan-out scaling calculation

xavierUniform :: Float -> [Int] -> IO Tensor Source #

Xavier Initialization - Uniform

xavierNormal :: Float -> [Int] -> IO Tensor Source #

Xavier Initialization - Normal

getter :: FanMode -> (Int, Int) -> Int Source #

Get fan in or fan out value depending on selected fan mode, used by Kaiming

kaimingUniform :: FanMode -> NonLinearity -> [Int] -> IO Tensor Source #

Kaiming Initialization - Uniform

kaimingNormal :: FanMode -> NonLinearity -> [Int] -> IO Tensor Source #

Kaiming Initialization - Normal