net shim
This commit is contained in:
parent
bfcc1ac25d
commit
b4a5c38f86
@ -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
9
src/graph/Graph.jl
Normal file
@ -0,0 +1,9 @@
|
||||
module Graph
|
||||
|
||||
export @net
|
||||
|
||||
macro net(ex)
|
||||
esc(ex)
|
||||
end
|
||||
|
||||
end
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user