Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- (~>) :: forall p q s t a b c. (PureProd Maybe p, PureProd Maybe q, PureProd Maybe s, PureProd Maybe t, AllConstrainedProd Backprop p, AllConstrainedProd Backprop q, AllConstrainedProd Backprop s, AllConstrainedProd Backprop t) => Model p s a b -> Model q t b c -> Model (p :#? q) (s :#? t) a c
- (<~) :: forall p q s t a b c. (PureProd Maybe p, PureProd Maybe q, PureProd Maybe s, PureProd Maybe t, AllConstrainedProd Backprop p, AllConstrainedProd Backprop q, AllConstrainedProd Backprop s, AllConstrainedProd Backprop t) => Model p s b c -> Model q t a b -> Model (p :#? q) (s :#? t) a c
- type LModel ps ss a b = Model (Just (T ps)) (Just (T ss)) a b
- (#:) :: forall p ps s ss a b c. (AllConstrainedProd Backprop p, AllConstrainedProd Backprop s, ReifyConstraint Backprop TF ps, ReifyConstraint Backprop TF ss, RMap ss, RApply ss, RMap ps, RApply ps, PureProd Maybe p, PureProd Maybe s) => Model p s b c -> LModel ps ss a b -> LModel (MaybeToList p ++ ps) (MaybeToList s ++ ss) a c
- nilLM :: Model (Just (T '[])) (Just (T '[])) a a
- (#++) :: forall ps qs ss ts a b c. (Learnables ps, Learnables qs, Learnables ss, Learnables ts, Learnables (ps ++ qs), Learnables (ss ++ ts)) => LModel ps ss b c -> LModel qs ts a b -> LModel (ps ++ qs) (ss ++ ts) a c
- liftLM :: forall p s a b. (SingI p, AllConstrainedProd Backprop p, SingI s, AllConstrainedProd Backprop s) => Model p s a b -> LModel (MaybeToList p) (MaybeToList s) a b
- forkModel :: forall p q s t a b c. (PureProd Maybe p, PureProd Maybe q, PureProd Maybe s, PureProd Maybe t, AllConstrainedProd Backprop p, AllConstrainedProd Backprop q, AllConstrainedProd Backprop s, AllConstrainedProd Backprop t, Backprop b, Backprop c) => Model p s a b -> Model q t a c -> Model (p :#? q) (s :#? t) a (b :# c)
- feedback :: forall p q s t a b. (PureProd Maybe p, PureProd Maybe q, PureProd Maybe s, PureProd Maybe t, AllConstrainedProd Backprop p, AllConstrainedProd Backprop q, AllConstrainedProd Backprop s, AllConstrainedProd Backprop t) => Int -> Model p s a b -> Model q t b a -> Model (p :#? q) (s :#? t) a b
- feedbackTrace :: forall n p q s t a b. (PureProd Maybe p, PureProd Maybe q, PureProd Maybe s, PureProd Maybe t, AllConstrainedProd Backprop p, AllConstrainedProd Backprop q, AllConstrainedProd Backprop s, AllConstrainedProd Backprop t, KnownNat n, Backprop b) => Model p s a b -> Model q t b a -> Model (p :#? q) (s :#? t) a (ABP (Vector n) b)
Tuple-based Composition
(~>) :: forall p q s t a b c. (PureProd Maybe p, PureProd Maybe q, PureProd Maybe s, PureProd Maybe t, AllConstrainedProd Backprop p, AllConstrainedProd Backprop q, AllConstrainedProd Backprop s, AllConstrainedProd Backprop t) => Model p s a b -> Model q t b c -> Model (p :#? q) (s :#? t) a c infixr 8 Source #
Compose two Model
s one after the other, in reverse composition order
(<~) :: forall p q s t a b c. (PureProd Maybe p, PureProd Maybe q, PureProd Maybe s, PureProd Maybe t, AllConstrainedProd Backprop p, AllConstrainedProd Backprop q, AllConstrainedProd Backprop s, AllConstrainedProd Backprop t) => Model p s b c -> Model q t a b -> Model (p :#? q) (s :#? t) a c infixr 8 Source #
Compose two Model
s one after the other.
List-based Composition
(#:) :: forall p ps s ss a b c. (AllConstrainedProd Backprop p, AllConstrainedProd Backprop s, ReifyConstraint Backprop TF ps, ReifyConstraint Backprop TF ss, RMap ss, RApply ss, RMap ps, RApply ps, PureProd Maybe p, PureProd Maybe s) => Model p s b c -> LModel ps ss a b -> LModel (MaybeToList p ++ ps) (MaybeToList s ++ ss) a c infixr 5 Source #
(#++) :: forall ps qs ss ts a b c. (Learnables ps, Learnables qs, Learnables ss, Learnables ts, Learnables (ps ++ qs), Learnables (ss ++ ts)) => LModel ps ss b c -> LModel qs ts a b -> LModel (ps ++ qs) (ss ++ ts) a c infixr 5 Source #
Compose two LModel
s
liftLM :: forall p s a b. (SingI p, AllConstrainedProd Backprop p, SingI s, AllConstrainedProd Backprop s) => Model p s a b -> LModel (MaybeToList p) (MaybeToList s) a b Source #
Misc
:: (PureProd Maybe p, PureProd Maybe q, PureProd Maybe s, PureProd Maybe t, AllConstrainedProd Backprop p, AllConstrainedProd Backprop q, AllConstrainedProd Backprop s, AllConstrainedProd Backprop t, Backprop b, Backprop c) | |
=> Model p s a b | fork 1 |
-> Model q t a c | fork 2 |
-> Model (p :#? q) (s :#? t) a (b :# c) |
:: (PureProd Maybe p, PureProd Maybe q, PureProd Maybe s, PureProd Maybe t, AllConstrainedProd Backprop p, AllConstrainedProd Backprop q, AllConstrainedProd Backprop s, AllConstrainedProd Backprop t) | |
=> Int | times |
-> Model p s a b | feed |
-> Model q t b a | back |
-> Model (p :#? q) (s :#? t) a b |
Return a model that loops a model ("feed") repeatedly onto itself, with a model to provide the back loop.
:: (PureProd Maybe p, PureProd Maybe q, PureProd Maybe s, PureProd Maybe t, AllConstrainedProd Backprop p, AllConstrainedProd Backprop q, AllConstrainedProd Backprop s, AllConstrainedProd Backprop t, KnownNat n, Backprop b) | |
=> Model p s a b | feed |
-> Model q t b a | back |
-> Model (p :#? q) (s :#? t) a (ABP (Vector n) b) |
feedback
, but tracing and observing all of the intermediate values.