This commit is contained in:
Mike J Innes 2017-10-05 13:11:01 +01:00
parent bfcc1ac25d
commit b4a5c38f86
3 changed files with 13 additions and 1 deletions

View File

@ -19,6 +19,9 @@ using .Tracker
include("optimise/Optimise.jl")
using .Optimise
include("graph/Graph.jl")
using .Graph
include("utils.jl")
include("onehot.jl")
include("tree.jl")

9
src/graph/Graph.jl Normal file
View File

@ -0,0 +1,9 @@
module Graph
export @net
macro net(ex)
esc(ex)
end
end

View File

@ -56,7 +56,7 @@ Dense(in::Integer, out::Integer, σ = identity; init = initn) =
treelike(Dense)
function (a::Dense)(x)
@net function (a::Dense)(x)
W, b, σ = a.W, a.b, a.σ
σ.(W*x .+ b)
end