on master help sign in
Update hmatrix
d360438Huw Campbell
grenade.cabal+1−1
@@ -76,7 +76,7 @@ executable mnist
76 , optparse-applicative == 0.12.*
76 , optparse-applicative == 0.12.*
77 , text == 1.2.*
77 , text == 1.2.*
78 , mtl >= 2.2.1 && < 2.3
78 , mtl >= 2.2.1 && < 2.3
79− , hmatrix
79+ , hmatrix >= 0.18 && < 0.19
80 , transformers
80 , transformers
81 , singletons
81 , singletons
82 , MonadRandom
82 , MonadRandom
lib/hmatrixdeleted−1

Submodule changed.

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