Skip to content

Instantly share code, notes, and snippets.

@denizyuret
Last active August 29, 2015 14:16
Show Gist options
  • Save denizyuret/59f40c2a25a568d4ed08 to your computer and use it in GitHub Desktop.
Save denizyuret/59f40c2a25a568d4ed08 to your computer and use it in GitHub Desktop.
function forw(l::Layer, x, apply_fx=true)
initforw(l, x)
isdefined(l,:fx) && apply_fx && l.fx(l,x)
@into! l.y = l.w * x
isdefined(l,:b) && (@in1! l.y .+ l.b)
isdefined(l,:f) && l.f(l,l.y)
l.x = x
return l.y
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment