Skip to content

Commit

Permalink
Forgot to add biases :(
Browse files Browse the repository at this point in the history
  • Loading branch information
dferens committed May 20, 2015
1 parent 31ce95f commit 034c337
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/clj/asols/trainer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@
(if (>= layer-i layers-count)
out-vectors
(let [is-out-layer? (= layer-i (dec layers-count))
{:keys [edges-matrix] :as layer} (nth layers layer-i)
weighted-sums (m/mmul (last out-vectors) edges-matrix)
{:keys [edges-matrix biases] :as layer} (nth layers layer-i)
weighted-sums (-> (last out-vectors)
(m/mmul edges-matrix)
(m/add! biases))
out-vec (forward layer weighted-sums)
final-out-vec (if is-out-layer?
out-vec
Expand Down

0 comments on commit 034c337

Please sign in to comment.