@@ -125,7 +125,8 @@ runNetwork =
125-- Gives the gradients for the layer, and the gradient across the
125-- Gives the gradients for the layer, and the gradient across the
126-- input (which may not be required).
126-- input (which may not be required).
128−runGradient :: forall layers shapes. Network layers shapes
128+runGradient :: forall layers shapes.
129+ Network layers shapes
129 -> Tapes layers shapes
130 -> Tapes layers shapes
130 -> S (Last shapes)
131 -> S (Last shapes)
131 -> (Gradients layers, S (Head shapes))
132 -> (Gradients layers, S (Head shapes))
@@ -157,10 +158,13 @@ applyUpdate _ NNil GNil
160−-- | A network can easily be created by hand with (:~>), but an easy way to initialise a random
161+-- | A network can easily be created by hand with (:~>), but an easy way to
161−-- network is with the randomNetwork.
162+-- initialise a random network is with the randomNetwork.
162class CreatableNetwork (xs :: [*]) (ss :: [Shape]) where
163class CreatableNetwork (xs :: [*]) (ss :: [Shape]) where
163− -- | Create a network of the types requested
164+ -- | Create a network with randomly initialised weights.
166+ -- Calls to this function will not compile if the type of the neural
167+ -- network is not sound.
164 randomNetwork :: MonadRandom m => m (Network xs ss)
168 randomNetwork :: MonadRandom m => m (Network xs ss)
166instance SingI i => CreatableNetwork '[] '[i] where
170instance SingI i => CreatableNetwork '[] '[i] where