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

Safe HaskellNone
LanguageHaskell2010

Backprop.Learn.Model.Neural

Contents

Synopsis

Feed-forward

type FCp = LRp Source #

Parameters for fully connected feed-forward layer with bias.

fc :: (KnownNat i, KnownNat o) => Model (Just (FCp i o)) Nothing (R i) (R o) Source #

Fully connected feed-forward layer with bias. Parameterized by its initialization distribution.

Note that this has no activation function; to use as a model with activation function, chain it with an activation function using RMap, :.~, etc.; see FCA for a convenient type synonym and constructor.

Without any activation function, this is essentially a multivariate linear regression.

With the logistic function as an activation function, this is essentially multivariate logistic regression. (See logReg)

fca :: (KnownNat i, KnownNat o) => (forall z. Reifies z W => BVar z (R o) -> BVar z (R o)) -> Model (Just (FCp i o)) Nothing (R i) (R o) Source #

Convenient synonym for an fC post-composed with a simple parameterless activation function.

fcWeights :: Lens (FCp i o) (FCp i' o) (L o i) (L o i') Source #

fcBias :: forall i o. Lens' (FCp i o) (R o) Source #

Recurrent

fcr Source #

Arguments

:: (KnownNat i, KnownNat o, KnownNat s) 
=> (forall z. Reifies z W => BVar z (R o) -> BVar z (R s))

store

-> Model (Just (FCRp s i o)) (Just (R s)) (R i) (R o) 

Fully connected recurrent layer with bias.

fcra Source #

Arguments

:: (KnownNat i, KnownNat o, KnownNat s) 
=> (forall z. Reifies z W => BVar z (R o) -> BVar z (R o)) 
-> (forall z. Reifies z W => BVar z (R o) -> BVar z (R s))

store

-> Model (Just (FCRp s i o)) (Just (R s)) (R i) (R o) 

Convenient synonym for an fcr post-composed with a simple parameterless activation function.

type FCRp s i o = FCp (i + s) o Source #

Parameter for fully connected recurrent layer.

fcrBias :: forall s i o. Lens' (FCRp s i o) (R o) Source #

fcrInputWeights :: (KnownNat s, KnownNat i, KnownNat i', KnownNat o) => Lens (FCRp s i o) (FCRp s i' o) (L o i) (L o i') Source #

fcrStateWeights :: (KnownNat s, KnownNat s', KnownNat i, KnownNat o) => Lens (FCRp s i o) (FCRp s' i o) (L o s) (L o s') Source #