Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Network :: ([k] -> Type) -> k -> k -> Type
- buildNet :: forall ss ps i o t. (SingI ss, SingI ps) => TOp ('[i] ': (ss ++ ps)) ('[o] ': ss) -> Prod t ss -> Prod t ps -> Network t i o
- netParams :: Network t i o -> (forall ss ps. (SingI ss, SingI ps) => Prod t ss -> Prod t ps -> r) -> r
- runNetwork :: (RealFloat (ElemT t), Tensor t) => Network t i o -> t '[i] -> (t '[o], Network t i o)
- runNetworkSt :: (RealFloat (ElemT t), Tensor t, MonadState (Network t i o) m) => t '[i] -> m (t '[o])
- genNet :: forall k o i m t. (SingI o, SingI i, PrimMonad m, Tensor t) => [(Integer, (Activation k, Maybe (Activation k)))] -> Activation k -> Maybe (Activation k) -> Gen (PrimState m) -> m (Network t i o)
- fullyConnected :: forall k i o m t. (SingI i, SingI o, PrimMonad m, Tensor t) => Activation k -> Gen (PrimState m) -> m (Network t i o)
- ffLayer :: forall i o m t. (SingI i, SingI o, PrimMonad m, Tensor t) => Gen (PrimState m) -> m (Network t i o)
- stateless :: Network t i o -> Network t i o
- (~*~) :: forall k t a b c. Network t a b -> Network t b c -> Network t a c
- (*~) :: Network t a b -> TOp '['[b]] '['[c]] -> Network t a c
- (~*) :: TOp '['[a]] '['[b]] -> Network t b c -> Network t a c
- nmap :: SingI o => (forall a. RealFloat a => a -> a) -> Network t i o -> Network t i o
- trainNetwork :: forall k t i o. (Tensor t, RealFloat (ElemT t), SingI i, SingI o) => TOp '['[o], '[o]] '['[]] -> ElemT t -> ElemT t -> [(t '[i], t '[o])] -> Network t i o -> Network t i o
- trainNetwork' :: forall k n t i o. (Tensor t, RealFloat (ElemT t), SingI i, SingI o) => TOp '['[o], '[o]] '['[]] -> ElemT t -> ElemT t -> Vec n (t '[i]) -> Vec n (t '[o]) -> Network t i o -> Network t i o
- networkGradient :: forall k n t i o r. (Tensor t, RealFloat (ElemT t), SingI i, SingI o) => TOp '['[o], '[o]] '['[]] -> Vec n (t '[i]) -> Vec n (t '[o]) -> Network t i o -> (forall ss ps. (SingI ss, SingI ps) => Vec n (t '[i]) -> Prod t ss -> Prod t ps -> r) -> r
Documentation
netParams :: Network t i o -> (forall ss ps. (SingI ss, SingI ps) => Prod t ss -> Prod t ps -> r) -> r Source #
runNetwork :: (RealFloat (ElemT t), Tensor t) => Network t i o -> t '[i] -> (t '[o], Network t i o) Source #
runNetworkSt :: (RealFloat (ElemT t), Tensor t, MonadState (Network t i o) m) => t '[i] -> m (t '[o]) Source #
genNet :: forall k o i m t. (SingI o, SingI i, PrimMonad m, Tensor t) => [(Integer, (Activation k, Maybe (Activation k)))] -> Activation k -> Maybe (Activation k) -> Gen (PrimState m) -> m (Network t i o) Source #
ffLayer :: forall i o m t. (SingI i, SingI o, PrimMonad m, Tensor t) => Gen (PrimState m) -> m (Network t i o) Source #
stateless :: Network t i o -> Network t i o Source #
Convert a neural network from TensorOps.Learn.NeuralNet.FeedForward
to a stateless Network
.
Can be thought a functor from the category of stateless neural networks to the category of stateful (recurrent) ones.
:: forall (t :: [k] -> Type) (i :: k) (o :: k). (Tensor t, RealFloat (ElemT t), SingI i, SingI o) | |
=> TOp '['[o], '[o]] '['[]] | loss function (input, target) |
-> ElemT t | train rate for initial state |
-> ElemT t | train rate for network parameters |
-> [(t '[i], t '[o])] | inputs and targets |
-> Network t i o | |
-> Network t i o |
:: forall (t :: [k] -> Type) (i :: k) (o :: k). (Tensor t, RealFloat (ElemT t), SingI i, SingI o) | |
=> TOp '['[o], '[o]] '['[]] | loss function (input, target) |
-> ElemT t | train rate for initial state |
-> ElemT t | train rate for network parameters |
-> Vec n (t '[i]) | inputs |
-> Vec n (t '[o]) | targets |
-> Network t i o | |
-> Network t i o |
:: forall (t :: [k] -> Type) (i :: k) (o :: k). (Tensor t, RealFloat (ElemT t), SingI i, SingI o) | |
=> TOp '['[o], '[o]] '['[]] | loss function (output, target) |
-> Vec n (t '[i]) | inputs |
-> Vec n (t '[o]) | targets |
-> Network t i o | |
-> (forall ss ps. (SingI ss, SingI ps) => Vec n (t '[i]) -> Prod t ss -> Prod t ps -> r) | |
-> r |