Commit 70b1fd2f authored by Jannis Weber's avatar Jannis Weber

Merge branch 'master' of git.thm.de:akwl20/neural-network-haskell

parents 6eab1872 4e662f3a
......@@ -177,12 +177,11 @@ update [] _ _ = []
update _ [] _ = []
update (m:matrices) (u:updates) learningRate = m - fmap (*learningRate) u : update matrices updates learningRate
-- |
gradients :: [Matrix Float]
-> [Matrix Float]
-> [Matrix Float]
-> Matrix Float
-> [(Matrix Float, Matrix Float)]
-- | 'gradients' calculates the updates for the 'weights' and 'biases' of a 'NeuralNetwork'. This function is only to be called by 'apply'
gradients :: [Matrix Float] -- ^ The 'weight' matrix
-> [Matrix Float] -- ^ The 'bias' matrix
-> [Matrix Float] -- ^ The activations calculated by
gradients [] _ _ _ = []
gradients _ [] _ _ = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment