backprop-learn-0.1.0.0: Combinators and useful tools for ANNs using the backprop library

Safe HaskellNone
LanguageHaskell2010

Backprop.Learn.Initialize

Contents

Synopsis

Documentation

class Initialize p where Source #

Class for types that are basically a bunch of Doubles, which can be initialized with a given identical and independent distribution.

Minimal complete definition

Nothing

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m p Source #

initialize :: (ADTRecord p, Constraints p Initialize, ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m p Source #

Instances
Initialize Double Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m Double Source #

Initialize Float Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m Float Source #

Initialize () Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m () Source #

Initialize T0 Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m T0 Source #

Initialize a => Initialize (Complex a) Source #

Initializes real and imaginary components identically

Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (Complex a) Source #

KnownNat n => Initialize (R n) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (R n) Source #

KnownNat n => Initialize (C n) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (C n) Source #

Initialize a => Initialize (TF a) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (TF a) Source #

RPureConstrained Initialize as => Initialize (T as) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (T as) Source #

(Initialize a, Initialize b) => Initialize (a, b) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (a, b) Source #

(KnownNat n, KnownNat m) => Initialize (L n m) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m0) => d -> Gen (PrimState m0) -> m0 (L n m) Source #

(KnownNat n, KnownNat m) => Initialize (M n m) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m0) => d -> Gen (PrimState m0) -> m0 (M n m) Source #

(Initialize a, Initialize b) => Initialize (a :# b) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (a :# b) Source #

(KnownNat o, KnownNat i) => Initialize (LRp i o) Source # 
Instance details

Defined in Backprop.Learn.Model.Regression

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (LRp i o) Source #

(KnownNat a, KnownNat b) => Initialize (ARIMAp a b) Source # 
Instance details

Defined in Backprop.Learn.Model.Regression

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (ARIMAp a b) Source #

(KnownNat i, KnownNat o) => Initialize (LSTMp i o) Source #

Forget biases initialized to 1

Instance details

Defined in Backprop.Learn.Model.Neural.LSTM

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (LSTMp i o) Source #

KnownNat o => Initialize (GRUp i o) Source # 
Instance details

Defined in Backprop.Learn.Model.Neural.LSTM

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (GRUp i o) Source #

(Initialize a, Initialize b, Initialize c) => Initialize (a, b, c) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (a, b, c) Source #

(Vector v a, KnownNat n, Initialize a) => Initialize (Vector v n a) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (Vector v n a) Source #

KnownNat c => Initialize (ARIMAs a b c) Source # 
Instance details

Defined in Backprop.Learn.Model.Regression

Methods

initialize :: (ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m (ARIMAs a b c) Source #

(Initialize a, Initialize b, Initialize c, Initialize d) => Initialize (a, b, c, d) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d0, PrimMonad m) => d0 -> Gen (PrimState m) -> m (a, b, c, d) Source #

(Initialize a, Initialize b, Initialize c, Initialize d, Initialize e) => Initialize (a, b, c, d, e) Source # 
Instance details

Defined in Backprop.Learn.Initialize

Methods

initialize :: (ContGen d0, PrimMonad m) => d0 -> Gen (PrimState m) -> m (a, b, c, d, e) Source #

gInitialize :: (ADTRecord p, Constraints p Initialize, ContGen d, PrimMonad m) => d -> Gen (PrimState m) -> m p Source #

initialize for any instance of Generic.

initializeNormal Source #

Arguments

:: (Initialize p, PrimMonad m) 
=> Double

standard deviation

-> Gen (PrimState m) 
-> m p 

Helper over inititialize for a gaussian distribution centered around zero.

initializeSingle :: (ContGen d, PrimMonad m, Fractional p) => d -> Gen (PrimState m) -> m p Source #

initialize definition if p is a single number.

Reshape

reshapeR :: forall i j d m. (ContGen d, PrimMonad m, KnownNat i, KnownNat j) => d -> Gen (PrimState m) -> R i -> m (R j) Source #

Reshape a vector to have a different amount of items If the matrix is grown, new weights are initialized according to the given distribution.

reshapeLRows :: forall i j n d m. (ContGen d, PrimMonad m, KnownNat n, KnownNat i, KnownNat j) => d -> Gen (PrimState m) -> L i n -> m (L j n) Source #

Reshape a matrix to have a different amount of rows If the matrix is grown, new weights are initialized according to the given distribution.

reshapeLCols :: forall i j n d m. (ContGen d, PrimMonad m, KnownNat n, KnownNat i, KnownNat j) => d -> Gen (PrimState m) -> L n i -> m (L n j) Source #

Reshape a matrix to have a different amount of columns. If the matrix is grown, new weights are initialized according to the given distribution.