Skip to content

Commit

Permalink
Explanation of weight initialization (+ reference)
Browse files Browse the repository at this point in the history
  • Loading branch information
prcastro committed Sep 12, 2015
1 parent 2d6f43e commit d65371d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/feedforward/network.jl
Expand Up @@ -61,7 +61,9 @@ A Neural Network (`FFNNet`)
function FFNNet(layers::Vector{FFNNLayer}, inputsize::Int)
# Create a vector of weight matrices
weights = Array(Matrix{Float64}, length(layers))


# This weight initialization is sensible (Glorot & Bengio 2010)
# W ~ U(∓ √6/√(sum of sizes of the 2 layers connected by W))
ɛ(a,b) = sqrt(6)/(sqrt(a + b))

# The first weight matrix is from the input (including bias)
Expand Down

0 comments on commit d65371d

Please sign in to comment.