Update hmatrix

This commit is contained in:
Huw Campbell 2016-12-07 14:50:55 +11:00
parent 2cb93c6a5b
commit d360438fc0
3 changed files with 3 additions and 4 deletions

View File

@ -76,7 +76,7 @@ executable mnist
, optparse-applicative == 0.12.*
, text == 1.2.*
, mtl >= 2.2.1 && < 2.3
, hmatrix
, hmatrix >= 0.18 && < 0.19
, transformers
, singletons
, MonadRandom

@ -1 +0,0 @@
Subproject commit 9aade51bd0bb6339cfa8aca014bd96f801d9b19e

View File

@ -16,7 +16,7 @@ import Data.Singletons.Prelude
import Grenade.Core.Network
import Grenade.Core.Shape
-- | Drive and network and collect it's back propogated gradients.
-- | Drive and network and collect its back propogated gradients.
backPropagate :: forall input output shapes layers. (Head shapes ~ input, Last shapes ~ output)
=> Network layers shapes -> S' input -> S' output -> Gradients layers
backPropagate network input target =
@ -29,7 +29,7 @@ backPropagate network input target =
-- handle input from the beginning, feeding upwards.
go !x (layer :~> n)
= let y = runForwards layer x
-- recursively run the rest of the network, and get the layer from above.
-- recursively run the rest of the network, and get the gradients from above.
(n', dWs') = go y n
-- calculate the gradient for this layer to pass down,
(layer', dWs) = runBackards layer x dWs'