Skip to content

Commit

Permalink
adapt function
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeInnes committed Oct 4, 2017
1 parent d93dc96 commit 285179e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/NNlib.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ module NNlib
export σ, relu, softmax

include("activation.jl")
include("adapt.jl")

end # module
7 changes: 7 additions & 0 deletions src/adapt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This doesn't really belong here, but it's convenient.

adapt_(T, x) = x

adapt(T, x) = adapt_(T, x)

adapt(T, x::RowVector) = RowVector(adapt(T, x.vec))

0 comments on commit 285179e

Please sign in to comment.